Issue11602
Created on 2011-03-18 19:11 by pitrou, last changed 2022-04-11 14:57 by admin.
| Messages (6) | |||
|---|---|---|---|
| msg131357 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2011-03-18 19:11 | |
python-config has the following non-trivial code for discovery of cflags/ldflags, which should be callable as a sysconfig API instead:
elif opt in ('--includes', '--cflags'):
flags = ['-I' + sysconfig.get_path('include'),
'-I' + sysconfig.get_path('platinclude')]
if opt == '--cflags':
flags.extend(getvar('CFLAGS').split())
print(' '.join(flags))
elif opt in ('--libs', '--ldflags'):
libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
libs.append('-lpython' + pyver + sys.abiflags)
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags':
if not getvar('Py_ENABLE_SHARED'):
libs.insert(0, '-L' + getvar('LIBPL'))
libs.extend(getvar('LINKFORSHARED').split())
print(' '.join(libs))
Also, it begs the question why distutils doesn't use the same code in its compiler class, or even in customize_compiler()...
|
|||
| msg131358 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2011-03-18 19:28 | |
+1 |
|||
| msg138610 - (view) | Author: Éric Araujo (eric.araujo) * ![]() |
Date: 2011-06-18 21:47 | |
+1 on the request. I don’t think it can go in 3.2, though. I’ll propose a patch, this will let me learn more about the flags. > Also, it begs the question why distutils doesn't use the same code in > its compiler class, or even in customize_compiler()... Certainly because distutils pre-dates python-config. In packaging, we should certainly use sysconfig functions. |
|||
| msg404884 - (view) | Author: Joannah Nanjekye (nanjekyejoannah) * ![]() |
Date: 2021-10-23 15:32 | |
@eric.araujo curious if you still have the interest to work on this. If not, I can help open a PR. |
|||
| msg404902 - (view) | Author: Éric Araujo (eric.araujo) * ![]() |
Date: 2021-10-23 18:45 | |
I don’t have specific expertise in this, so please take it! |
|||
| msg404903 - (view) | Author: Filipe Laíns (FFY00) * ![]() |
Date: 2021-10-23 18:47 | |
I can help out, but would like to wait until we get a resolution in GH-25718 as it will likely conflict. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:15 | admin | set | github: 55811 |
| 2021-10-23 18:47:55 | FFY00 | set | messages: + msg404903 |
| 2021-10-23 18:45:53 | eric.araujo | set | versions:
+ Python 3.11, - Python 3.3 nosy: - tarek, alexis messages: + msg404902 assignee: eric.araujo -> nanjekyejoannah |
| 2021-10-23 16:46:11 | FFY00 | set | nosy:
+ FFY00 |
| 2021-10-23 15:32:41 | nanjekyejoannah | set | messages: + msg404884 |
| 2019-07-26 22:10:21 | nanjekyejoannah | set | nosy:
+ nanjekyejoannah |
| 2016-08-20 05:39:20 | cjrh | set | nosy:
+ cjrh |
| 2012-07-26 23:23:57 | ned.deily | set | nosy:
+ ned.deily |
| 2012-07-26 15:38:55 | barry | set | nosy:
+ barry |
| 2011-06-18 21:47:46 | eric.araujo | set | assignee: tarek -> eric.araujo |
| 2011-06-18 21:47:36 | eric.araujo | set | versions:
- Python 3.2 nosy: + alexis messages: + msg138610 components: + Library (Lib), Distutils2, - Distutils |
| 2011-03-18 19:28:51 | rhettinger | set | nosy:
+ rhettinger messages: + msg131358 |
| 2011-03-18 19:11:17 | pitrou | create | |

