diff options
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/python-3-search-paths.patch | 28 | ||||
-rw-r--r-- | gnu/packages/patches/python-3.8-search-paths.patch | 17 | ||||
-rw-r--r-- | gnu/packages/python.scm | 36 |
4 files changed, 20 insertions, 62 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 63a3fcffbe..4f1385d73b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1307,7 +1307,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-3-fix-tests.patch \ - %D%/packages/patches/python-3.8-search-paths.patch \ %D%/packages/patches/python-3.8-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index cf1647207b..aaf7236631 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -3,23 +3,23 @@ looking for headers and libraries. --- a/setup.py 2015-10-07 23:32:58.891329173 +0200 +++ b/setup.py 2015-10-07 23:46:29.653349924 +0200 -@@ -575,15 +575,15 @@ +@@ -676,15 +676,15 @@ # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. - if not cross_compiling: -- lib_dirs = self.compiler.library_dirs + system_lib_dirs -- inc_dirs = self.compiler.include_dirs + system_include_dirs -+ lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) else: # Add the sysroot paths. 'sysroot' is a compiler option used to # set the logical path of the standard system headers and # libraries. -- lib_dirs = (self.compiler.library_dirs + -+ lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) + - sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs)) -- inc_dirs = (self.compiler.include_dirs + -+ inc_dirs = (os.getenv('CROSS_CPATH', '').split(os.pathsep) + - sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'), - system_include_dirs)) - exts = [] +- self.lib_dirs = (self.compiler.library_dirs + ++ self.lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) + + sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs)) +- self.inc_dirs = (self.compiler.include_dirs + ++ self.inc_dirs = (os.getenv('CROSS_CPATH', '').split(os.pathsep) + + sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'), + system_include_dirs)) + diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch deleted file mode 100644 index 88f19850bf..0000000000 --- a/gnu/packages/patches/python-3.8-search-paths.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/setup.py b/setup.py -index 20d7f35..5751083 100644 ---- a/setup.py -+++ b/setup.py -@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. - if not CROSS_COMPILING: -- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs -- self.inc_dirs = self.compiler.include_dirs + system_include_dirs -+ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) - else: - # Add the sysroot paths. 'sysroot' is a compiler option used to - # set the logical path of the standard system headers and --- -2.23.0 diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7aa170ffc0..96caaae0b3 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -344,27 +344,28 @@ data types.") (name "python") (properties `((superseded . ,python-2))))) -(define-public python-3.7 +(define-public python-3.8 (package (inherit python-2) (name "python") - (version "3.7.4") + (version "3.8.1") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches "python-3-fix-tests.patch" + "python-3.8-fix-tests.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch")) (sha256 (base32 - "0gxiv5617zd7dnqm5k9r4q2188lk327nf9jznwq9j6b8p0s92ygv")) + "1s4lwn5vzsajlc88m6hkghsvnjw4d00l2dsgng0m2w6vyqbl32bm")) (modules '((guix build utils))) (snippet '(begin ;; Delete the bundled copy of libexpat. (delete-file-recursively "Modules/expat") - (substitute* "Modules/Setup.dist" + (substitute* "Modules/Setup" ;; Link Expat instead of embedding the bundled one. (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) #t)))) @@ -432,33 +433,8 @@ data types.") (version-major+minor version) "/site-packages")))))))) -(define-public python-3.8 - (package - (inherit python-3.7) - (name "python-next") - (version "3.8.0") - (source - (origin - (inherit (package-source python-3.7)) - (uri (string-append "https://www.python.org/ftp/python/" - version "/Python-" version ".tar.xz")) - (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) - (patches (search-patches - "python-3.8-search-paths.patch" - "python-3-fix-tests.patch" - "python-3.8-fix-tests.patch" - "python-3-deterministic-build-info.patch")) - (snippet - '(begin - ;; Delete the bundled copy of libexpat. - (delete-file-recursively "Modules/expat") - (substitute* "Modules/Setup" - ;; Link Expat instead of embedding the bundled one. - (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) - #t)))))) - ;; Current 3.x version. -(define-public python-3 python-3.7) +(define-public python-3 python-3.8) ;; Current major version. (define-public python python-3) |