churchyard / rpms / python27

Forked from rpms/python27 4 years ago
Clone
7b135f4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
7b135f4
From: Fedora Python maintainers <python-devel@lists.fedoraproject.org>
7b135f4
Date: Wed, 15 Jul 2020 15:10:19 +0200
7b135f4
Subject: [PATCH] python-2.7.1-config.patch
7b135f4
7b135f4
00000 #
7b135f4
Modules/Setup.dist is ultimately used by the "makesetup" script to construct
7b135f4
the Makefile and config.c
7b135f4
7b135f4
Upstream leaves many things disabled by default, to try to make it easy as
7b135f4
possible to build the code on as many platforms as possible.
7b135f4
7b135f4
TODO: many modules can also now be built by setup.py after the python binary
7b135f4
has been built; need to assess if we should instead build things there
7b135f4
7b135f4
We patch it downstream as follows:
7b135f4
  - various modules are built by default by upstream as static libraries;
7b135f4
  we built them as shared libraries
7b135f4
  - build the "readline" module (appears to also be handled by setup.py now)
7b135f4
  - build the nis module (which needs the tirpc library since glibc 2.26)
7b135f4
  - enable the build of the following modules:
7b135f4
    - array arraymodule.c     # array objects
7b135f4
    - cmath cmathmodule.c # -lm # complex math library functions
7b135f4
    - math mathmodule.c # -lm # math library functions, e.g. sin()
7b135f4
    - _struct _struct.c       # binary structure packing/unpacking
7b135f4
    - time timemodule.c # -lm # time operations and variables
7b135f4
    - operator operator.c     # operator.add() and similar goodies
7b135f4
    - _weakref _weakref.c     # basic weak reference support
7b135f4
    - _testcapi _testcapimodule.c    # Python C API test module
7b135f4
    - _random _randommodule.c # Random number generator
7b135f4
    - _collections _collectionsmodule.c # Container types
7b135f4
    - itertools itertoolsmodule.c
7b135f4
    - strop stropmodule.c
7b135f4
    - _functools _functoolsmodule.c
7b135f4
    - _bisect _bisectmodule.c # Bisection algorithms
7b135f4
    - unicodedata unicodedata.c    # static Unicode character database
7b135f4
    - _locale _localemodule.c
7b135f4
    - fcntl fcntlmodule.c     # fcntl(2) and ioctl(2)
7b135f4
    - spwd spwdmodule.c               # spwd(3)
7b135f4
    - grp grpmodule.c         # grp(3)
7b135f4
    - select selectmodule.c   # select(2); not on ancient System V
7b135f4
    - mmap mmapmodule.c  # Memory-mapped files
7b135f4
    - _csv _csv.c  # CSV file helper
7b135f4
    - _socket socketmodule.c  # Socket module helper for socket(2)
7b135f4
    - _ssl _ssl.c
7b135f4
    - crypt cryptmodule.c -lcrypt     # crypt(3)
7b135f4
    - termios termios.c       # Steen Lumholt's termios module
7b135f4
    - resource resource.c     # Jeremy Hylton's rlimit interface
7b135f4
    - audioop audioop.c       # Operations on audio samples
7b135f4
    - imageop imageop.c       # Operations on images
7b135f4
    - _md5 md5module.c md5.c
7b135f4
    - _sha shamodule.c
7b135f4
    - _sha256 sha256module.c
7b135f4
    - _sha512 sha512module.c
7b135f4
    - linuxaudiodev linuxaudiodev.c
7b135f4
    - timing timingmodule.c
7b135f4
    - _tkinter _tkinter.c tkappinit.c
7b135f4
    - dl dlmodule.c
7b135f4
    - gdbm gdbmmodule.c
7b135f4
    - _bsddb _bsddb.c
7b135f4
    - binascii binascii.c
7b135f4
    - parser parsermodule.c
7b135f4
    - cStringIO cStringIO.c
7b135f4
    - cPickle cPickle.c
7b135f4
    - zlib zlibmodule.c
7b135f4
    - _multibytecodec cjkcodecs/multibytecodec.c
7b135f4
    - _codecs_cn cjkcodecs/_codecs_cn.c
7b135f4
    - _codecs_hk cjkcodecs/_codecs_hk.c
7b135f4
    - _codecs_iso2022 cjkcodecs/_codecs_iso2022.c
7b135f4
    - _codecs_jp cjkcodecs/_codecs_jp.c
7b135f4
    - _codecs_kr cjkcodecs/_codecs_kr.c
7b135f4
    - _codecs_tw cjkcodecs/_codecs_tw.c
7b135f4
---
7b135f4
 Modules/Setup.dist | 122 ++++++++++++++++++++++-----------------------
7b135f4
 1 file changed, 60 insertions(+), 62 deletions(-)
7b135f4
75a0703
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
7b135f4
index bbc92221296..2cf35a9640d 100644
75a0703
--- a/Modules/Setup.dist
75a0703
+++ b/Modules/Setup.dist
4b97eeb
@@ -153,7 +153,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # modules are to be built as shared libraries (see above for more
60b7a5f
 # detail; also note that *static* reverses this effect):
60b7a5f
 
60b7a5f
-#*shared*
60b7a5f
+*shared*
60b7a5f
 
60b7a5f
 # GNU readline.  Unlike previous Python incarnations, GNU readline is
60b7a5f
 # now incorporated in an optional module, configured in the Setup file
75a0703
@@ -163,33 +163,33 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # it, depending on your system -- see the GNU readline instructions.
60b7a5f
 # It's okay for this to be a shared library, too.
60b7a5f
 
60b7a5f
-#readline readline.c -lreadline -ltermcap
a7ef9c1
+readline readline.c -lreadline -ltermcap
60b7a5f
 
60b7a5f
 
60b7a5f
 # Modules that should always be present (non UNIX dependent):
60b7a5f
 
60b7a5f
-#array arraymodule.c	# array objects
c6247fd
-#cmath cmathmodule.c _math.c # -lm # complex math library functions
c6247fd
-#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
60b7a5f
-#_struct _struct.c	# binary structure packing/unpacking
60b7a5f
-#time timemodule.c # -lm # time operations and variables
60b7a5f
-#operator operator.c	# operator.add() and similar goodies
60b7a5f
-#_testcapi _testcapimodule.c    # Python C API test module
60b7a5f
-#_random _randommodule.c	# Random number generator
a7ef9c1
-#_collections _collectionsmodule.c # Container types
60b7a5f
+array arraymodule.c	# array objects
c6247fd
+cmath cmathmodule.c _math.c # -lm # complex math library functions
c6247fd
+math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
60b7a5f
+_struct _struct.c	# binary structure packing/unpacking
60b7a5f
+time timemodule.c # -lm # time operations and variables
60b7a5f
+operator operator.c	# operator.add() and similar goodies
60b7a5f
+_testcapi _testcapimodule.c    # Python C API test module
60b7a5f
+_random _randommodule.c	# Random number generator
a7ef9c1
+_collections _collectionsmodule.c # Container types
43e7c42
 #_heapq _heapqmodule.c		# Heapq type
43e7c42
-#itertools itertoolsmodule.c	# Functions creating iterators for efficient looping 
43e7c42
-#strop stropmodule.c		# String manipulations
43e7c42
-#_functools _functoolsmodule.c	# Tools for working with functions and callable objects
60b7a5f
+itertools itertoolsmodule.c	# Functions creating iterators for efficient looping 
60b7a5f
+strop stropmodule.c		# String manipulations
59ba18a
+_functools _functoolsmodule.c	# Tools for working with functions and callable objects
94e658a
 #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c	# elementtree accelerator
94e658a
 #_pickle _pickle.c	# pickle accelerator
94e658a
 #datetime datetimemodule.c	# date/time type
94e658a
-#_bisect _bisectmodule.c	# Bisection algorithms
59ba18a
+_bisect _bisectmodule.c	# Bisection algorithms
60b7a5f
 
60b7a5f
-#unicodedata unicodedata.c    # static Unicode character database
60b7a5f
+unicodedata unicodedata.c    # static Unicode character database
60b7a5f
 
60b7a5f
 # access to ISO C locale support
60b7a5f
-#_locale _localemodule.c  # -lintl
60b7a5f
+_locale _localemodule.c  # -lintl
60b7a5f
 
7b42f48
 # Standard I/O baseline
7b42f48
 #_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c
75a0703
@@ -199,41 +199,41 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # (If you have a really backward UNIX, select and socket may not be
60b7a5f
 # supported...)
60b7a5f
 
60b7a5f
-#fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
60b7a5f
-#spwd spwdmodule.c		# spwd(3) 
60b7a5f
-#grp grpmodule.c		# grp(3)
60b7a5f
-#select selectmodule.c	# select(2); not on ancient System V
60b7a5f
+fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
60b7a5f
+spwd spwdmodule.c		# spwd(3) 
60b7a5f
+grp grpmodule.c		# grp(3)
60b7a5f
+select selectmodule.c	# select(2); not on ancient System V
60b7a5f
 
60b7a5f
 # Memory-mapped files (also works on Win32).
60b7a5f
-#mmap mmapmodule.c
60b7a5f
+mmap mmapmodule.c
60b7a5f
 
60b7a5f
 # CSV file helper
60b7a5f
-#_csv _csv.c
60b7a5f
+_csv _csv.c
60b7a5f
 
60b7a5f
 # Socket module helper for socket(2)
7b42f48
-#_socket socketmodule.c timemodule.c
43e7c42
+_socket socketmodule.c timemodule.c
60b7a5f
 
60b7a5f
 # Socket module helper for SSL support; you must comment out the other
60b7a5f
 # socket line above, and possibly edit the SSL variable:
60b7a5f
 #SSL=/usr/local/ssl
60b7a5f
-#_ssl _ssl.c \
60b7a5f
-#	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
60b7a5f
-#	-L$(SSL)/lib -lssl -lcrypto
60b7a5f
+_ssl _ssl.c \
60b7a5f
+	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
60b7a5f
+	-L$(SSL)/lib -lssl -lcrypto
60b7a5f
 
60b7a5f
 # The crypt module is now disabled by default because it breaks builds
60b7a5f
 # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
60b7a5f
 #
60b7a5f
 # First, look at Setup.config; configure may have set this for you.
60b7a5f
 
60b7a5f
-#crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
43e7c42
+crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
60b7a5f
 
60b7a5f
 
60b7a5f
 # Some more UNIX dependent modules -- off by default, since these
60b7a5f
 # are not supported by all UNIX systems:
60b7a5f
 
60b7a5f
-#nis nismodule.c -lnsl	# Sun yellow pages -- not everywhere
60b7a5f
-#termios termios.c	# Steen Lumholt's termios module
60b7a5f
-#resource resource.c	# Jeremy Hylton's rlimit interface
3056bfd
+nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
60b7a5f
+termios termios.c	# Steen Lumholt's termios module
60b7a5f
+resource resource.c	# Jeremy Hylton's rlimit interface
60b7a5f
 
60b7a5f
 
60b7a5f
 # Multimedia modules -- off by default.
75a0703
@@ -241,8 +241,8 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # #993173 says audioop works on 64-bit platforms, though.
60b7a5f
 # These represent audio samples or images as strings:
60b7a5f
 
60b7a5f
-#audioop audioop.c	# Operations on audio samples
60b7a5f
-#imageop imageop.c	# Operations on images
60b7a5f
+audioop audioop.c	# Operations on audio samples
60b7a5f
+imageop imageop.c	# Operations on images
60b7a5f
 
60b7a5f
 
60b7a5f
 # Note that the _md5 and _sha modules are normally only built if the
75a0703
@@ -252,14 +252,14 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # Message-Digest Algorithm, described in RFC 1321.  The necessary files
60b7a5f
 # md5.c and md5.h are included here.
60b7a5f
 
60b7a5f
-#_md5 md5module.c md5.c
60b7a5f
+_md5 md5module.c md5.c
60b7a5f
 
60b7a5f
 
a7ef9c1
 # The _sha module implements the SHA checksum algorithms.
a7ef9c1
 # (NIST's Secure Hash Algorithms.)
60b7a5f
-#_sha shamodule.c
a7ef9c1
-#_sha256 sha256module.c
a7ef9c1
-#_sha512 sha512module.c
60b7a5f
+_sha shamodule.c
a7ef9c1
+_sha256 sha256module.c
a7ef9c1
+_sha512 sha512module.c
60b7a5f
 
60b7a5f
 
60b7a5f
 # SGI IRIX specific modules -- off by default.
75a0703
@@ -306,12 +306,12 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # A Linux specific module -- off by default; this may also work on 
60b7a5f
 # some *BSDs.
60b7a5f
 
60b7a5f
-#linuxaudiodev linuxaudiodev.c
60b7a5f
+linuxaudiodev linuxaudiodev.c
60b7a5f
 
60b7a5f
 
60b7a5f
 # George Neville-Neil's timing module:
60b7a5f
 
60b7a5f
-#timing timingmodule.c
60b7a5f
+timing timingmodule.c
60b7a5f
 
60b7a5f
 
60b7a5f
 # The _tkinter module.
75a0703
@@ -326,7 +326,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # every system.
60b7a5f
 
60b7a5f
 # *** Always uncomment this (leave the leading underscore in!):
60b7a5f
-# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
60b7a5f
+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
60b7a5f
 # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
60b7a5f
 #	-L/usr/local/lib \
60b7a5f
 # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
75a0703
@@ -336,7 +336,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # *** Or uncomment this for Solaris:
60b7a5f
 #	-I/usr/openwin/include \
60b7a5f
 # *** Uncomment and edit for Tix extension only:
60b7a5f
-#	-DWITH_TIX -ltix8.1.8.2 \
60b7a5f
+	-DWITH_TIX -ltix \
60b7a5f
 # *** Uncomment and edit for BLT extension only:
60b7a5f
 #	-DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
60b7a5f
 # *** Uncomment and edit for PIL (TkImaging) extension only:
75a0703
@@ -345,7 +345,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # *** Uncomment and edit for TOGL extension only:
60b7a5f
 #	-DWITH_TOGL togl.c \
60b7a5f
 # *** Uncomment and edit to reflect your Tcl/Tk versions:
60b7a5f
-#	-ltk8.2 -ltcl8.2 \
60b7a5f
+	-ltk -ltcl \
60b7a5f
 # *** Uncomment and edit to reflect where your X11 libraries are:
60b7a5f
 #	-L/usr/X11R6/lib \
60b7a5f
 # *** Or uncomment this for Solaris:
75a0703
@@ -355,7 +355,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # *** Uncomment for AIX:
60b7a5f
 #	-lld \
60b7a5f
 # *** Always uncomment this; X11 libraries to link with:
60b7a5f
-#	-lX11
60b7a5f
+	-lX11
60b7a5f
 
60b7a5f
 # Lance Ellinghaus's syslog module
60b7a5f
 #syslog syslogmodule.c		# syslog daemon interface
75a0703
@@ -377,7 +377,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # it is a highly experimental and dangerous device for calling
60b7a5f
 # *arbitrary* C functions in *arbitrary* shared libraries:
60b7a5f
 
60b7a5f
-#dl dlmodule.c
60b7a5f
+dl dlmodule.c
60b7a5f
 
60b7a5f
 
60b7a5f
 # Modules that provide persistent dictionary-like semantics.  You will
75a0703
@@ -400,7 +400,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 #
60b7a5f
 # First, look at Setup.config; configure may have set this for you.
60b7a5f
 
60b7a5f
-#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
59ba18a
+gdbm gdbmmodule.c -lgdbm
60b7a5f
 
60b7a5f
 
60b7a5f
 # Sleepycat Berkeley DB interface.
75a0703
@@ -415,11 +415,9 @@ GLHACK=-Dclear=__GLclear
94e658a
 #
60b7a5f
 # Edit the variables DB and DBLIBVERto point to the db top directory
60b7a5f
 # and the subdirectory of PORT where you built it.
60b7a5f
-#DB=/usr/local/BerkeleyDB.4.0
60b7a5f
-#DBLIBVER=4.0
60b7a5f
-#DBINC=$(DB)/include
60b7a5f
-#DBLIB=$(DB)/lib
60b7a5f
-#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
4fd811c
+DBINC=/usr/include/libdb
60b7a5f
+DBLIB=/usr/lib
4fd811c
+_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
60b7a5f
 
60b7a5f
 # Historical Berkeley DB 1.85
60b7a5f
 #
75a0703
@@ -434,14 +432,14 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 
60b7a5f
 
60b7a5f
 # Helper module for various ascii-encoders
60b7a5f
-#binascii binascii.c
60b7a5f
+binascii binascii.c
60b7a5f
 
60b7a5f
 # Fred Drake's interface to the Python parser
60b7a5f
-#parser parsermodule.c
60b7a5f
+parser parsermodule.c
60b7a5f
 
60b7a5f
 # cStringIO and cPickle
60b7a5f
-#cStringIO cStringIO.c
60b7a5f
-#cPickle cPickle.c
60b7a5f
+cStringIO cStringIO.c
60b7a5f
+cPickle cPickle.c
60b7a5f
 
60b7a5f
 
60b7a5f
 # Lee Busby's SIGFPE modules.
75a0703
@@ -464,7 +462,7 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # Andrew Kuchling's zlib module.
60b7a5f
 # This require zlib 1.1.3 (or later).
60b7a5f
 # See http://www.gzip.org/zlib/
60b7a5f
-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
60b7a5f
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
60b7a5f
 
60b7a5f
 # Interface to the Expat XML parser
75a0703
 # More information on Expat can be found at www.libexpat.org.
75a0703
@@ -475,14 +473,14 @@ GLHACK=-Dclear=__GLclear
60b7a5f
 # Hye-Shik Chang's CJKCodecs
60b7a5f
 
60b7a5f
 # multibytecodec is required for all the other CJK codec modules
60b7a5f
-#_multibytecodec cjkcodecs/multibytecodec.c
7b135f4
+_multibytecodec cjkcodecs/multibytecodec.c
7b135f4
 
60b7a5f
-#_codecs_cn cjkcodecs/_codecs_cn.c
60b7a5f
-#_codecs_hk cjkcodecs/_codecs_hk.c
60b7a5f
-#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
60b7a5f
-#_codecs_jp cjkcodecs/_codecs_jp.c
60b7a5f
-#_codecs_kr cjkcodecs/_codecs_kr.c
60b7a5f
-#_codecs_tw cjkcodecs/_codecs_tw.c
60b7a5f
+_codecs_cn cjkcodecs/_codecs_cn.c
60b7a5f
+_codecs_hk cjkcodecs/_codecs_hk.c
60b7a5f
+_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
60b7a5f
+_codecs_jp cjkcodecs/_codecs_jp.c
60b7a5f
+_codecs_kr cjkcodecs/_codecs_kr.c
60b7a5f
+_codecs_tw cjkcodecs/_codecs_tw.c
60b7a5f
 
60b7a5f
 # Example -- included for reference only:
60b7a5f
 # xx xxmodule.c