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
This commit is contained in:
Marius Bakke 2021-08-12 00:30:27 +02:00
commit c4133c43c7
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
181 changed files with 256111 additions and 218870 deletions

View file

@ -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 dont 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