gnu: Python: Update to 3.8.1.

* gnu/packages/python.scm (python-3.7): Rename to ...
(python-3.8): ... this.  Update to 3.8.1.
[source](patches): Add "python-3.8-fix-tests.patch".
[source](snippet): Adjust for renamed file.
(python-3): Alias to PYTHON-3.8.
* gnu/packages/patches/python-3-search-paths.patch: Adjust for 3.8.
* gnu/packages/patches/python-3.8-search-paths.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
This commit is contained in:
Marius Bakke 2020-01-14 19:52:58 +01:00
parent 49d7167328
commit b15d1c467f
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
4 changed files with 20 additions and 62 deletions

View file

@ -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 \

View file

@ -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))

View file

@ -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

View file

@ -344,27 +344,28 @@ (define-public python2-called-python
(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 @@ (define-public python-3.7
(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)