[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2.
From: |
Hartmut Goebel |
Subject: |
[bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2. |
Date: |
Thu, 8 Mar 2018 17:48:50 +0100 |
* gnu/packages/python.scm (python-3.7): New variable.
* gnu/packages/patches/python-3.7-search-paths.patch: New file
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/patches/python-3.7-search-paths.patch | 16 ++++++++
gnu/packages/python.scm | 44 ++++++++++++++++++++++
3 files changed, 61 insertions(+)
create mode 100644 gnu/packages/patches/python-3.7-search-paths.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 47eb1d988..fb69097bd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1021,6 +1021,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-2.7-search-paths.patch \
%D%/packages/patches/python-2.7-site-prefixes.patch \
%D%/packages/patches/python-2.7-source-date-epoch.patch \
+ %D%/packages/patches/python-3.7-search-paths.patch \
%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 \
diff --git a/gnu/packages/patches/python-3.7-search-paths.patch
b/gnu/packages/patches/python-3.7-search-paths.patch
new file mode 100644
index 000000000..2960185fd
--- /dev/null
+++ b/gnu/packages/patches/python-3.7-search-paths.patch
@@ -0,0 +1,16 @@
+Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when
+looking for headers and libraries.
+
+--- setup.py 2018-03-08 09:57:52.993780176 +0100
++++ setup.py 2018-03-08 09:58:28.448240983 +0100
+@@ -594,8 +594,8 @@
+ add_dir_to_list(self.compiler.include_dirs,
+ sysconfig.get_config_var("INCLUDEDIR"))
+
+- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
+- system_include_dirs = ['/usr/include']
++ system_lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep)
++ system_include_dirs = os.getenv('C_INCLUDE_PATH',
'').split(os.pathsep)
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 064d79002..50bb1e398 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -368,6 +368,50 @@ data types.")
(version-major+minor version)
"/site-packages"))))))))
+(define-public python-3.7
+ (package (inherit python-3.6)
+ (version "3.7.0b2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.python.org/ftp/python/"
+ "3.7.0" "/Python-" version ".tar.xz"))
+ (patches (search-patches
+ "python-fix-tests.patch"
+ "python-3-fix-tests.patch"
+ "python-3-deterministic-build-info.patch"
+ "python-3.7-search-paths.patch"))
+ (patch-flags '("-p0"))
+ (sha256
+ (base32 "10n87x65gsw8lc7iqry2yfpaf4szncr8z40vm5hspkgxzbkjs24j"))
+ (snippet
+ '(begin
+ (for-each
+ delete-file
+ '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
+ "Lib/ctypes/test/test_win32.py" ; fails on aarch64
+ "Lib/test/test_fcntl.py")) ; fails on aarch64
+ #t))))
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments python)
+ ((#:tests? _) #f)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it
+ ;; again afterwards.
+ (add-before 'check 'unset-SOURCE_DATE_EPOCH
+ (lambda _
+ (unsetenv "SOURCE_DATE_EPOCH")))
+ (add-after 'check 'reset-SOURCE_DATE_EPOCH
+ (lambda _
+ (setenv "SOURCE_DATE_EPOCH" "1")))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "PYTHONPATH")
+ (files (list (string-append "lib/python"
+ (version-major+minor version)
+ "/site-packages"))))))))
+
;; Current 3.x version.
(define-public python-3 python-3.6)
--
2.13.6
- [bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2.,
Hartmut Goebel <=