Commit 440fdcac authored by MARAIT Gilles's avatar MARAIT Gilles
Browse files

Simplify scalable-python package

Fix scalable-python
parent 2d26c37b
......@@ -27,7 +27,8 @@
#:use-module (inria eztrace)
#:use-module (inria simgrid)
#:use-module (guix utils)
#:use-module (srfi srfi-1))
#:use-module (srfi srfi-1)
)
(define-public parsec
(package
......@@ -884,6 +885,7 @@ CTAGS = $(CTAGSPROG)
(package
(inherit python-2.7)
(name "scalable-python")
(version "2.7.13")
(home-page "https://github.com/CSCfi/scalable-python.git")
(source (origin
(method git-fetch)
......@@ -891,7 +893,12 @@ CTAGS = $(CTAGSPROG)
(url home-page)
(commit "b0b9d3f29298b719f9e4f684deae713c0a224b0e")
))
(patches (search-patches "inria/patches/scalable-python.patch"))
(patches (search-patches
"inria/patches/scalable-python.patch"
"python-2.7-search-paths.patch"
"python-2-deterministic-build-info.patch"
"python-2.7-site-prefixes.patch"
))
(sha256
(base32
"0ivxsf17x7vjxr5h4g20rb5i3k705vgd502ma024z95fnyzd0bqi"))))
......@@ -910,12 +917,12 @@ CTAGS = $(CTAGSPROG)
(replace 'move-tk-inter (lambda _ #t)) ;; Not sure what this is anyway
))
((#:configure-flags flags '())
`(cons "--enable-mpi" (cons "--without-ensurepip" (delete "--with-ensurepip=install",flags)))
)
`(cons "--enable-mpi" (cons "--without-ensurepip" (delete "--with-ensurepip=install",flags))))
((#:make-flags makeflags '())
`(cons "mpi" (cons "install-mpi",makeflags)))
`(cons "mpi" (cons "install" (cons "install-mpi",makeflags))))
((#:tests? runtests '())
#f)))
#f)
))
(description
"Modified python 2.7.13. Scalable Python performs the I/O operations used
e.g. by import statements in a single process and uses MPI to transmit data
......
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index 40c10fa..8ae763e 100644
index 40c10fa..8fec77b 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -122,7 +122,7 @@ _weakref _weakref.c # weak references
......@@ -16,7 +16,22 @@ index 40c10fa..8ae763e 100644
array arraymodule.c # array objects
cmath cmathmodule.c _math.c # -lm # complex math library functions
-math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
+math mathmodule.c #_math.c # -lm # math library functions, e.g. sin()
+#math mathmodule.c #_math.c # -lm # math library functions, e.g. sin()
_struct _struct.c # binary structure packing/unpacking
time timemodule.c # -lm # time operations and variables
operator operator.c # operator.add() and similar goodies
diff --git a/Python/import.c b/Python/import.c
index 722721b..fb83b87 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -966,6 +966,10 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat, t
/* Now write the true mtime (as a 32-bit field) */
fseek(fp, 4L, 0);
assert(mtime <= 0xFFFFFFFF);
+ if (Py_GETENV("SOURCE_DATE_EPOCH") != NULL) {
+ const char *epoch = Py_GETENV("SOURCE_DATE_EPOCH");
+ mtime = atoi(epoch);
+ }
PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION);
fflush(fp);
fclose(fp);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment