summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-08-12 00:30:27 +0200
committerMarius Bakke <marius@gnu.org>2021-08-12 00:30:27 +0200
commitc4133c43c7cfe2476ebfae87f9e4d10d96de9bc7 (patch)
tree47bd773d2f434384b54e56916c1a287dd8e51511 /gnu/packages/python.scm
parentffa01e68859bb7a6daa9fcffdc8d77ca35db4bc0 (diff)
parent4eb0a5146ae5a195a29c79f586fcc1e58f7fa69b (diff)
Merge branch 'master' into core-updates-frozen
Conflicts: gnu/packages/algebra.scm gnu/packages/games.scm gnu/packages/golang.scm gnu/packages/kerberos.scm gnu/packages/mail.scm gnu/packages/python.scm gnu/packages/ruby.scm gnu/packages/scheme.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm90
1 files changed, 47 insertions, 43 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9e637a03d0..28a3c77953 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -748,15 +748,14 @@ ease from the desktop to a microcontroller or embedded system.")
(define-public pypy3
(package
(name "pypy3")
- (version "7.3.1")
+ (version "7.3.5")
(source (origin
(method url-fetch)
- (uri (string-append "https://bitbucket.org/pypy/pypy/downloads/" ;
- "pypy3.6-v" version "-src.tar.bz2"))
+ (uri (string-append "https://downloads.python.org/pypy/"
+ "pypy3.7-v" version "-src.tar.bz2"))
(sha256
(base32
- "10zsk8jby8j6visk5mzikpb1cidvz27qq4pfpa26jv53klic6b0c"))
- (patches (search-patches "pypy3-7.3.1-fix-tests.patch"))))
+ "18lrdmpcczlbk3cfarkgwqdmilrybz56i1dafk8dkjlyk90gw86r"))))
(build-system gnu-build-system)
(native-inputs
`(("python-2" ,python-2)
@@ -778,10 +777,9 @@ ease from the desktop to a microcontroller or embedded system.")
("tcl" ,tcl)
("tk" ,tk)
("glibc" ,glibc)
- ("bash-minimal" ,bash-minimal) ; Used as /bin/sh
("xz" ,xz))) ; liblzma
(arguments
- `(#:tests? #f ;FIXME: Disabled for now, there are many tests failing.
+ `(#:tests? #f ;FIXME: 43 out of 364 tests are failing
#:modules ((ice-9 ftw) (ice-9 match)
(guix build utils) (guix build gnu-build-system))
#:phases (modify-phases %standard-phases
@@ -810,6 +808,12 @@ ease from the desktop to a microcontroller or embedded system.")
(substitute* '("lib_pypy/_curses_build.py")
;; Find curses
(("/usr/local") (assoc-ref inputs "ncurses")))
+ (substitute* '("lib_pypy/_dbm.py")
+ ;; Use gdbm compat library, so we don’t need to pull
+ ;; in bdb.
+ (("ctypes.util.find_library\\('db'\\)")
+ (format #f "'~a/lib/libgdbm_compat.so'"
+ (assoc-ref inputs "gdbm"))))
(substitute* '("lib_pypy/_sqlite3_build.py")
;; Always use search paths
(("sys\\.platform\\.startswith\\('freebsd'\\)") "True")
@@ -825,8 +829,7 @@ ease from the desktop to a microcontroller or embedded system.")
(search-input-file inputs "/bin/sh")))
(substitute* '("lib-python/3/distutils/unixccompiler.py")
;; gcc-toolchain does not provide symlink cc -> gcc
- (("\"cc\"") "\"gcc\""))
- #t))
+ (("\"cc\"") "\"gcc\""))))
(add-after
'unpack 'set-source-file-times-to-1980
;; copied from python package, required by zip testcase
@@ -834,8 +837,7 @@ ease from the desktop to a microcontroller or embedded system.")
(let ((circa-1980 (* 10 366 24 60 60)))
(ftw "." (lambda (file stat flag)
(utime file circa-1980 circa-1980)
- #t))
- #t)))
+ #t)))))
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "pypy/goal"
@@ -845,7 +847,8 @@ ease from the desktop to a microcontroller or embedded system.")
(string-append "--make-jobs="
(number->string (parallel-job-count)))
"-Ojit"
- "targetpypystandalone"))
+ "targetpypystandalone"
+ "--allworkingmodules"))
;; Build c modules and package everything, so tests work.
(with-directory-excursion "pypy/tool/release"
(invoke "python2" "package.py"
@@ -864,44 +867,45 @@ ease from the desktop to a microcontroller or embedded system.")
"pypy/test_all.py"
"--pypy=pypy/tool/release/pypy-dist/bin/pypy3"
"lib-python"))
- (format #t "test suite not run~%"))
- #t))
+ (format #t "test suite not run~%"))))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
- (with-directory-excursion "pypy/tool/release"
- ;; Delete test data.
- (for-each
- (lambda (x)
- (delete-file-recursively (string-append
- "pypy-dist/lib-python/3/" x)))
- '("tkinter/test"
- "test"
- "sqlite3/test"
- "lib2to3/tests"
- "idlelib/idle_test"
- "distutils/tests"
- "ctypes/test"
- "unittest/test"))
- ;; Patch shebang referencing python2
- (substitute* '("pypy-dist/lib-python/3/cgi.py"
- "pypy-dist/lib-python/3/encodings/rot_13.py")
- (("#!.+/bin/python")
- (string-append "#!" (assoc-ref outputs "out") "/bin/pypy3")))
- (with-fluids ((%default-port-encoding "ISO-8859-1"))
- (substitute* '("pypy-dist/lib_pypy/_md5.py"
- "pypy-dist/lib_pypy/_sha1.py")
- (("#!.+/bin/python")
- (string-append "#!" (assoc-ref outputs "out") "/bin/pypy3"))))
- (copy-recursively "pypy-dist" (assoc-ref outputs "out")))
- #t)))))
+ (let* ((out (assoc-ref outputs "out"))
+ (bin-pypy3 (string-append out "/bin/pypy3"))
+ (shebang-match-python "#!.+/bin/python")
+ (shebang-pypy3 (string-append "#!" bin-pypy3))
+ (dist-dir "pypy/tool/release/pypy-dist"))
+ (with-directory-excursion dist-dir
+ ;; Delete test data.
+ (for-each
+ (lambda (x)
+ (delete-file-recursively (string-append
+ "lib-python/3/" x)))
+ '("tkinter/test"
+ "test"
+ "sqlite3/test"
+ "lib2to3/tests"
+ "idlelib/idle_test"
+ "distutils/tests"
+ "ctypes/test"
+ "unittest/test"))
+ ;; Patch shebang referencing python2
+ (substitute* '("lib-python/3/cgi.py"
+ "lib-python/3/encodings/rot_13.py")
+ ((shebang-match-python) shebang-pypy3))
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
+ (substitute* '("lib_pypy/_md5.py"
+ "lib_pypy/_sha1.py")
+ ((shebang-match-python) shebang-pypy3))))
+ (copy-recursively dist-dir out)))))))
(home-page "https://www.pypy.org/")
(synopsis "Python implementation with just-in-time compilation")
(description "PyPy is a faster, alternative implementation of the Python
programming language employing a just-in-time compiler. It supports most
Python code natively, including C extensions.")
- (license (list license:expat ; pypy itself; _pytest/
- license:psfl ; python standard library in lib-python/
- license:asl2.0 ; dotviewer/font/ and some of lib-python/
+ (license (list license:expat ; pypy itself; _pytest/
+ license:psfl ; python standard library in lib-python/
+ license:asl2.0 ; dotviewer/font/ and some of lib-python/
license:gpl3+ ; ./rpython/rlib/rvmprof/src/shared/libbacktrace/dwarf2.*
license:bsd-3 ; lib_pypy/cffi/_pycparser/ply/
(license:non-copyleft