unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2.
@ 2018-03-08 16:48 Hartmut Goebel
       [not found] ` <handler.30752.B.152052776316653.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Hartmut Goebel @ 2018-03-08 16:48 UTC (permalink / raw)
  To: 30752

* 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2.
       [not found] ` <handler.30752.B.152052776316653.ack@debbugs.gnu.org>
@ 2018-03-08 17:02   ` Hartmut Goebel
  2018-08-29 21:14     ` bug#30752: " Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Hartmut Goebel @ 2018-03-08 17:02 UTC (permalink / raw)
  To: 30752

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@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#30752: [PATCH 1/1] gnu: Add Python 3.7.0b2.
  2018-03-08 17:02   ` Hartmut Goebel
@ 2018-08-29 21:14     ` Leo Famulari
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2018-08-29 21:14 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: 30752-done

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-29 21:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-08 16:48 [bug#30752] [PATCH 1/1] gnu: Add Python 3.7.0b2 Hartmut Goebel
     [not found] ` <handler.30752.B.152052776316653.ack@debbugs.gnu.org>
2018-03-08 17:02   ` Hartmut Goebel
2018-08-29 21:14     ` bug#30752: " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).