summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFedora Python maintainers <python-devel@lists.fedoraproject.org>2020-07-15 13:22:18 (GMT)
committerPetr Viktorin <pviktori@redhat.com>2020-09-29 13:59:05 (GMT)
commit47c9bc289cb972dbfca1ab0c5654a0f480c1ddb9 (patch)
treea9b1a7eb54da941cdc46c6563975b51002ad89f7
parentb470370c65bc460b343a7899177725bd386969a7 (diff)
downloadcpython-47c9bc289cb972dbfca1ab0c5654a0f480c1ddb9.zip
cpython-47c9bc289cb972dbfca1ab0c5654a0f480c1ddb9.tar.gz
cpython-47c9bc289cb972dbfca1ab0c5654a0f480c1ddb9.tar.bz2
python-2.7.2-add-extension-suffix-to-python-config.patch
00130 # Add "--extension-suffix" option to python-config and python-debug-config (rhbz#732808) This is adapted from 3.2's PEP-3149 support. Fedora's debug build has some non-standard features (see also patch 112 above), though largely shared with Debian/Ubuntu and Windows In particular, SO in the Makefile is currently always just ".so" for our python 2 optimized builds, but for python 2 debug it should be '_d.so', to distinguish the debug vs optimized ABI, following the pattern in the above patch. Not yet sent upstream
-rw-r--r--Misc/python-config.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/Misc/python-config.in b/Misc/python-config.in
index 896c849..c1691ef 100644
--- a/Misc/python-config.in
+++ b/Misc/python-config.in
@@ -6,7 +6,7 @@ import getopt
from distutils import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
- 'ldflags', 'help']
+ 'ldflags', 'extension-suffix', 'help']
def exit_with_usage(code=1):
print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
@@ -56,3 +56,5 @@ for opt in opt_flags:
libs.extend(getvar('LINKFORSHARED').split())
print ' '.join(libs)
+ elif opt == '--extension-suffix':
+ print (sys.pydebug and "_d" or "") + sysconfig.get_config_var('SO')