diff --git a/build/pkgs/python3/checksums.ini b/build/pkgs/python3/checksums.ini index f2727eaf401..936ac821ed2 100644 --- a/build/pkgs/python3/checksums.ini +++ b/build/pkgs/python3/checksums.ini @@ -1,5 +1,5 @@ tarball=Python-VERSION.tar.xz -sha1=89ee31611b73dc0c32c178d15aa208734b462c5a -md5=4efe92adf28875c77d3b9b2e8d3bc44a -cksum=2916176597 +sha1=a368aeed7a3325e47b55168452c356a8eb27ab50 +md5=b353b8433e560e1af2b130f56dfbd973 +cksum=534846730 upstream_url=https://www.python.org/ftp/python/VERSION/Python-VERSION.tar.xz diff --git a/build/pkgs/python3/package-version.txt b/build/pkgs/python3/package-version.txt index 371cfe355dd..b6d8b7612f0 100644 --- a/build/pkgs/python3/package-version.txt +++ b/build/pkgs/python3/package-version.txt @@ -1 +1 @@ -3.11.1 +3.11.8 diff --git a/build/pkgs/python3/patches/2.6.5-FD_SETSIZE.patch b/build/pkgs/python3/patches/2.6.5-FD_SETSIZE.patch deleted file mode 100644 index d1e0aa7352e..00000000000 --- a/build/pkgs/python3/patches/2.6.5-FD_SETSIZE.patch +++ /dev/null @@ -1,47 +0,0 @@ -This patch has never been submitted upstream for some reason, but it simply -increases the default number of file descriptors the Python process can have on -Cygwin, which mitigates some issues; see -https://cygwin.com/ml/cygwin/2011-03/msg00651.html -diff --git a/Python-3.6.1/Modules/selectmodule.c.orig b/Python-3.6.1/Modules/selectmodule.c -index 47da493..ae60234 100644 ---- a/Modules/selectmodule.c -+++ b/Modules/selectmodule.c -@@ -8,6 +8,21 @@ - #define _GNU_SOURCE - #endif - -+/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined. -+ 64 is too small (too many people have bumped into that limit). -+ Here we boost it. -+ -+ Cygwin also defines FD_SETSIZE to 64, so also increase the limit on -+ Cygwin. We must do this before sys/types.h is included, which otherwise -+ sets FD_SETSIZE to the default. -+ -+ Users who want even more than the boosted limit should #define -+ FD_SETSIZE higher before this; e.g., via compiler /D switch. -+*/ -+#if (defined(MS_WINDOWS) || defined(__CYGWIN__)) && !defined(FD_SETSIZE) -+#define FD_SETSIZE 512 -+#endif -+ - #include "Python.h" - #include - -@@ -26,16 +41,6 @@ - #undef HAVE_BROKEN_POLL - #endif - --/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined. -- 64 is too small (too many people have bumped into that limit). -- Here we boost it. -- Users who want even more than the boosted limit should #define -- FD_SETSIZE higher before this; e.g., via compiler /D switch. --*/ --#if defined(MS_WINDOWS) && !defined(FD_SETSIZE) --#define FD_SETSIZE 512 --#endif -- - #if defined(HAVE_POLL_H) - #include - #elif defined(HAVE_SYS_POLL_H) diff --git a/build/pkgs/python3/patches/2.7.3-dylib.patch b/build/pkgs/python3/patches/2.7.3-dylib.patch deleted file mode 100644 index be0de05d388..00000000000 --- a/build/pkgs/python3/patches/2.7.3-dylib.patch +++ /dev/null @@ -1,15 +0,0 @@ -This patch provides a workaround to one long-standing problem with building -extension modules on Cygwin; see https://bugs.python.org/issue2445 for more -background. -diff --git a/Lib/distutils/unixccompiler.py.orig b/Lib/distutils/unixccompiler.py -index 3f321c2..fb5a8fc 100644 ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -81,6 +81,7 @@ class UnixCCompiler(CCompiler): - xcode_stub_lib_format = dylib_lib_format - if sys.platform == "cygwin": - exe_extension = ".exe" -+ dylib_lib_extension = ".dll.a" - - def preprocess(self, source, output_file=None, macros=None, - include_dirs=None, extra_preargs=None, extra_postargs=None): diff --git a/build/pkgs/python3/patches/3.2.6-no-enable-new-dtags.patch b/build/pkgs/python3/patches/3.2.6-no-enable-new-dtags.patch deleted file mode 100644 index ea9b7cecd03..00000000000 --- a/build/pkgs/python3/patches/3.2.6-no-enable-new-dtags.patch +++ /dev/null @@ -1,22 +0,0 @@ -The --enable-new-dtags linker flag should not be used when building non-ELF -binaries. This is related to http://bugs.python.org/issue17362 -diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py -index 69045f8..7ed0a5f 100644 ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -243,9 +243,13 @@ class UnixCCompiler(CCompiler): - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": -- # GNU ld needs an extra option to get a RUNPATH -+ # GNU ELF ld needs an extra option to get a RUNPATH - # instead of just an RPATH. -- return "-Wl,--enable-new-dtags,-R" + dir -+ if sys.platform in ["win32", "cygwin"] or \ -+ "mingw" in compiler: -+ return [] -+ else: -+ return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir - else: diff --git a/build/pkgs/python3/spkg-build.in b/build/pkgs/python3/spkg-build.in index c8058023b28..f2a8b4311db 100644 --- a/build/pkgs/python3/spkg-build.in +++ b/build/pkgs/python3/spkg-build.in @@ -73,25 +73,26 @@ sdh_configure --enable-shared $PYTHON_CONFIGURE # we need to provide paths into $SAGE_LOCAL, so that setup.py finds # the libraries needed for the extension modules - in particular sqlite3. # (The search code there does not know about CPATH and LIBRARY_PATH.) -make_LDFLAGS="-L. -Wl,-rpath,. -L$SAGE_LOCAL/lib $LDFLAGS" -make_CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS" -# Also, we need to add an rpath, like we do for SAGE_LOCAL in src/bin/sage-env. -# SAGE_INST_LOCAL is the installation hierarchy for the current package -# -- for python3, this is SAGE_VENV. -make_LDFLAGS="-Wl,-rpath,$SAGE_INST_LOCAL/lib $make_LDFLAGS" +if [ "$UNAME" = "Darwin" ]; then + make_LDFLAGS="-L$SAGE_LOCAL/lib -L$SAGE_INST_LOCAL/lib $LDFLAGS" + # This enables python to find libpython + export DYLD_LIBRARY_PATH="." +fi if [ "$UNAME" = "Linux" ]; then + make_LDFLAGS="-L. -Wl,-rpath,. -L$SAGE_LOCAL/lib $LDFLAGS" + make_CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS" + # Also, we need to add an rpath, like we do for SAGE_LOCAL in src/bin/sage-env. + # SAGE_INST_LOCAL is the installation hierarchy for the current package + # -- for python3, this is SAGE_VENV. + make_LDFLAGS="-Wl,-rpath,$SAGE_INST_LOCAL/lib $make_LDFLAGS" make_LDFLAGS="-Wl,-rpath-link,$SAGE_INST_LOCAL/lib $make_LDFLAGS" + # This enables python to find libpython + export LD_LIBRARY_PATH="." fi sdh_make LDFLAGS="$make_LDFLAGS" CPPFLAGS="$make_CPPFLAGS" -if [ "$UNAME" = "Darwin" ]; then - export DYLD_LIBRARY_PATH="." -else - export LD_LIBRARY_PATH="." -fi - # When building on a case-insensitive filesystem (on any OS, not just Windows) # the Python executable is output to the build directory as 'python.exe' if [ -f "python.exe" ]; then