GNU bug report logs - #30752
[PATCH 1/1] gnu: Add Python 3.7.0b2.

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Thu, 8 Mar 2018 16:50:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30752 in the body.
You can then email your comments to 30752 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#30752; Package guix-patches. (Thu, 08 Mar 2018 16:50:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 08 Mar 2018 16:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: guix-patches <at> gnu.org
Subject: [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





Information forwarded to guix-patches <at> gnu.org:
bug#30752; Package guix-patches. (Thu, 08 Mar 2018 17:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 30752 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 30752 <at> debbugs.gnu.org
Subject: Re: [PATCH 1/1] gnu: Add Python 3.7.0b2.
Date: Thu, 8 Mar 2018 18:02:00 +0100
Please note this is adding BETA 2. For the release the version and the
source uri need to be adopted.

I need 3.7 for some other project, thus developed this patch. To avoid
duplicate work by others, I decided to publish these even if Python 3.7
currently is only beta.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Wed, 29 Aug 2018 21:15:02 GMT) Full text and rfc822 format available.

Notification sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
bug acknowledged by developer. (Wed, 29 Aug 2018 21:15:03 GMT) Full text and rfc822 format available.

Message #13 received at 30752-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 30752-done <at> debbugs.gnu.org
Subject: Re: [bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2.
Date: Wed, 29 Aug 2018 17:14:08 -0400
[Message part 1 (text/plain, inline)]
On Thu, Mar 08, 2018 at 06:02:00PM +0100, Hartmut Goebel wrote:
> Please note this is adding BETA 2. For the release the version and the
> source uri need to be adopted.
> 
> I need 3.7 for some other project, thus developed this patch. To avoid
> duplicate work by others, I decided to publish these even if Python 3.7
> currently is only beta.

Thanks!

Core-updates currently has 3.7.0, so I'm closing this bug.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Sep 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.