diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2021-09-22 06:25:20 +0000 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-09-22 06:25:20 +0000 |
| commit | 0cccc2f52cedd9b0e0646cc4d3ae64a886f2db6b (patch) | |
| tree | d9724175476a27a7234140519e035c8d4c79aedc /gnu/packages/python.scm | |
| parent | 22f7d4bce1e694b7ac38e62410d76a6d46d96c5d (diff) | |
| parent | d58e52b0713648dd30d41b41277854a935d8d15a (diff) | |
Merge remote-tracking branch core-updates-frozen into core-updates
Diffstat (limited to 'gnu/packages/python.scm')
| -rw-r--r-- | gnu/packages/python.scm | 96 |
1 files changed, 50 insertions, 46 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9e637a03d0d..08d7c2f41e6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> | 8 | ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> |
| 9 | ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> | 9 | ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> |
| 10 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> | 10 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
| 11 | ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org> | 11 | ;;; Copyright © 2015, 2016 Christine Lemmer-Webber <cwebber@dustycloud.org> |
| 12 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> | 12 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> |
| 13 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> | 13 | ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> |
| 14 | ;;; Copyright © 2015, 2016, 2017, 2021 Leo Famulari <leo@famulari.name> | 14 | ;;; Copyright © 2015, 2016, 2017, 2021 Leo Famulari <leo@famulari.name> |
| @@ -311,8 +311,8 @@ | |||
| 311 | (when (file-exists? dir) | 311 | (when (file-exists? dir) |
| 312 | (delete-file-recursively dir)))) | 312 | (delete-file-recursively dir)))) |
| 313 | '("email/test" "ctypes/test" "unittest/test" "tkinter/test" | 313 | '("email/test" "ctypes/test" "unittest/test" "tkinter/test" |
| 314 | "sqlite3/test" "bsddb/test" "lib-tk/test" "lib2to3/tests" | 314 | "sqlite3/test" "bsddb/test" "lib-tk/test" "json/tests" |
| 315 | "json/tests" "distutils/tests")))))))) | 315 | "distutils/tests")))))))) |
| 316 | (add-after 'remove-tests 'move-tk-inter | 316 | (add-after 'remove-tests 'move-tk-inter |
| 317 | (lambda* (#:key outputs #:allow-other-keys) | 317 | (lambda* (#:key outputs #:allow-other-keys) |
| 318 | ;; When Tkinter support is built move it to a separate output so | 318 | ;; When Tkinter support is built move it to a separate output so |
| @@ -748,15 +748,14 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 748 | (define-public pypy3 | 748 | (define-public pypy3 |
| 749 | (package | 749 | (package |
| 750 | (name "pypy3") | 750 | (name "pypy3") |
| 751 | (version "7.3.1") | 751 | (version "7.3.5") |
| 752 | (source (origin | 752 | (source (origin |
| 753 | (method url-fetch) | 753 | (method url-fetch) |
| 754 | (uri (string-append "https://bitbucket.org/pypy/pypy/downloads/" ; | 754 | (uri (string-append "https://downloads.python.org/pypy/" |
| 755 | "pypy3.6-v" version "-src.tar.bz2")) | 755 | "pypy3.7-v" version "-src.tar.bz2")) |
| 756 | (sha256 | 756 | (sha256 |
| 757 | (base32 | 757 | (base32 |
| 758 | "10zsk8jby8j6visk5mzikpb1cidvz27qq4pfpa26jv53klic6b0c")) | 758 | "18lrdmpcczlbk3cfarkgwqdmilrybz56i1dafk8dkjlyk90gw86r")))) |
| 759 | (patches (search-patches "pypy3-7.3.1-fix-tests.patch")))) | ||
| 760 | (build-system gnu-build-system) | 759 | (build-system gnu-build-system) |
| 761 | (native-inputs | 760 | (native-inputs |
| 762 | `(("python-2" ,python-2) | 761 | `(("python-2" ,python-2) |
| @@ -778,10 +777,9 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 778 | ("tcl" ,tcl) | 777 | ("tcl" ,tcl) |
| 779 | ("tk" ,tk) | 778 | ("tk" ,tk) |
| 780 | ("glibc" ,glibc) | 779 | ("glibc" ,glibc) |
| 781 | ("bash-minimal" ,bash-minimal) ; Used as /bin/sh | ||
| 782 | ("xz" ,xz))) ; liblzma | 780 | ("xz" ,xz))) ; liblzma |
| 783 | (arguments | 781 | (arguments |
| 784 | `(#:tests? #f ;FIXME: Disabled for now, there are many tests failing. | 782 | `(#:tests? #f ;FIXME: 43 out of 364 tests are failing |
| 785 | #:modules ((ice-9 ftw) (ice-9 match) | 783 | #:modules ((ice-9 ftw) (ice-9 match) |
| 786 | (guix build utils) (guix build gnu-build-system)) | 784 | (guix build utils) (guix build gnu-build-system)) |
| 787 | #:phases (modify-phases %standard-phases | 785 | #:phases (modify-phases %standard-phases |
| @@ -810,6 +808,12 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 810 | (substitute* '("lib_pypy/_curses_build.py") | 808 | (substitute* '("lib_pypy/_curses_build.py") |
| 811 | ;; Find curses | 809 | ;; Find curses |
| 812 | (("/usr/local") (assoc-ref inputs "ncurses"))) | 810 | (("/usr/local") (assoc-ref inputs "ncurses"))) |
| 811 | (substitute* '("lib_pypy/_dbm.py") | ||
| 812 | ;; Use gdbm compat library, so we don’t need to pull | ||
| 813 | ;; in bdb. | ||
| 814 | (("ctypes.util.find_library\\('db'\\)") | ||
| 815 | (format #f "'~a/lib/libgdbm_compat.so'" | ||
| 816 | (assoc-ref inputs "gdbm")))) | ||
| 813 | (substitute* '("lib_pypy/_sqlite3_build.py") | 817 | (substitute* '("lib_pypy/_sqlite3_build.py") |
| 814 | ;; Always use search paths | 818 | ;; Always use search paths |
| 815 | (("sys\\.platform\\.startswith\\('freebsd'\\)") "True") | 819 | (("sys\\.platform\\.startswith\\('freebsd'\\)") "True") |
| @@ -825,8 +829,7 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 825 | (search-input-file inputs "/bin/sh"))) | 829 | (search-input-file inputs "/bin/sh"))) |
| 826 | (substitute* '("lib-python/3/distutils/unixccompiler.py") | 830 | (substitute* '("lib-python/3/distutils/unixccompiler.py") |
| 827 | ;; gcc-toolchain does not provide symlink cc -> gcc | 831 | ;; gcc-toolchain does not provide symlink cc -> gcc |
| 828 | (("\"cc\"") "\"gcc\"")) | 832 | (("\"cc\"") "\"gcc\"")))) |
| 829 | #t)) | ||
| 830 | (add-after | 833 | (add-after |
| 831 | 'unpack 'set-source-file-times-to-1980 | 834 | 'unpack 'set-source-file-times-to-1980 |
| 832 | ;; copied from python package, required by zip testcase | 835 | ;; copied from python package, required by zip testcase |
| @@ -834,8 +837,7 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 834 | (let ((circa-1980 (* 10 366 24 60 60))) | 837 | (let ((circa-1980 (* 10 366 24 60 60))) |
| 835 | (ftw "." (lambda (file stat flag) | 838 | (ftw "." (lambda (file stat flag) |
| 836 | (utime file circa-1980 circa-1980) | 839 | (utime file circa-1980 circa-1980) |
| 837 | #t)) | 840 | #t))))) |
| 838 | #t))) | ||
| 839 | (replace 'build | 841 | (replace 'build |
| 840 | (lambda* (#:key inputs #:allow-other-keys) | 842 | (lambda* (#:key inputs #:allow-other-keys) |
| 841 | (with-directory-excursion "pypy/goal" | 843 | (with-directory-excursion "pypy/goal" |
| @@ -845,7 +847,8 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 845 | (string-append "--make-jobs=" | 847 | (string-append "--make-jobs=" |
| 846 | (number->string (parallel-job-count))) | 848 | (number->string (parallel-job-count))) |
| 847 | "-Ojit" | 849 | "-Ojit" |
| 848 | "targetpypystandalone")) | 850 | "targetpypystandalone" |
| 851 | "--allworkingmodules")) | ||
| 849 | ;; Build c modules and package everything, so tests work. | 852 | ;; Build c modules and package everything, so tests work. |
| 850 | (with-directory-excursion "pypy/tool/release" | 853 | (with-directory-excursion "pypy/tool/release" |
| 851 | (invoke "python2" "package.py" | 854 | (invoke "python2" "package.py" |
| @@ -864,44 +867,45 @@ ease from the desktop to a microcontroller or embedded system.") | |||
| 864 | "pypy/test_all.py" | 867 | "pypy/test_all.py" |
| 865 | "--pypy=pypy/tool/release/pypy-dist/bin/pypy3" | 868 | "--pypy=pypy/tool/release/pypy-dist/bin/pypy3" |
| 866 | "lib-python")) | 869 | "lib-python")) |
| 867 | (format #t "test suite not run~%")) | 870 | (format #t "test suite not run~%")))) |
| 868 | #t)) | ||
| 869 | (replace 'install | 871 | (replace 'install |
| 870 | (lambda* (#:key inputs outputs #:allow-other-keys) | 872 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 871 | (with-directory-excursion "pypy/tool/release" | 873 | (let* ((out (assoc-ref outputs "out")) |
| 872 | ;; Delete test data. | 874 | (bin-pypy3 (string-append out "/bin/pypy3")) |
| 873 | (for-each | 875 | (shebang-match-python "#!.+/bin/python") |
| 874 | (lambda (x) | 876 | (shebang-pypy3 (string-append "#!" bin-pypy3)) |
| 875 | (delete-file-recursively (string-append | 877 | (dist-dir "pypy/tool/release/pypy-dist")) |
| 876 | "pypy-dist/lib-python/3/" x))) | 878 | (with-directory-excursion dist-dir |
| 877 | '("tkinter/test" | 879 | ;; Delete test data. |
| 878 | "test" | 880 | (for-each |
| 879 | "sqlite3/test" | 881 | (lambda (x) |
| 880 | "lib2to3/tests" | 882 | (delete-file-recursively (string-append |
| 881 | "idlelib/idle_test" | 883 | "lib-python/3/" x))) |
| 882 | "distutils/tests" | 884 | '("tkinter/test" |
| 883 | "ctypes/test" | 885 | "test" |
| 884 | "unittest/test")) | 886 | "sqlite3/test" |
| 885 | ;; Patch shebang referencing python2 | 887 | "lib2to3/tests" |
| 886 | (substitute* '("pypy-dist/lib-python/3/cgi.py" | 888 | "idlelib/idle_test" |
| 887 | "pypy-dist/lib-python/3/encodings/rot_13.py") | 889 | "distutils/tests" |
| 888 | (("#!.+/bin/python") | 890 | "ctypes/test" |
| 889 | (string-append "#!" (assoc-ref outputs "out") "/bin/pypy3"))) | 891 | "unittest/test")) |
| 890 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | 892 | ;; Patch shebang referencing python2 |
| 891 | (substitute* '("pypy-dist/lib_pypy/_md5.py" | 893 | (substitute* '("lib-python/3/cgi.py" |
| 892 | "pypy-dist/lib_pypy/_sha1.py") | 894 | "lib-python/3/encodings/rot_13.py") |
| 893 | (("#!.+/bin/python") | 895 | ((shebang-match-python) shebang-pypy3)) |
| 894 | (string-append "#!" (assoc-ref outputs "out") "/bin/pypy3")))) | 896 | (with-fluids ((%default-port-encoding "ISO-8859-1")) |
| 895 | (copy-recursively "pypy-dist" (assoc-ref outputs "out"))) | 897 | (substitute* '("lib_pypy/_md5.py" |
| 896 | #t))))) | 898 | "lib_pypy/_sha1.py") |
| 899 | ((shebang-match-python) shebang-pypy3)))) | ||
| 900 | (copy-recursively dist-dir out))))))) | ||
| 897 | (home-page "https://www.pypy.org/") | 901 | (home-page "https://www.pypy.org/") |
| 898 | (synopsis "Python implementation with just-in-time compilation") | 902 | (synopsis "Python implementation with just-in-time compilation") |
| 899 | (description "PyPy is a faster, alternative implementation of the Python | 903 | (description "PyPy is a faster, alternative implementation of the Python |
| 900 | programming language employing a just-in-time compiler. It supports most | 904 | programming language employing a just-in-time compiler. It supports most |
| 901 | Python code natively, including C extensions.") | 905 | Python code natively, including C extensions.") |
| 902 | (license (list license:expat ; pypy itself; _pytest/ | 906 | (license (list license:expat ; pypy itself; _pytest/ |
| 903 | license:psfl ; python standard library in lib-python/ | 907 | license:psfl ; python standard library in lib-python/ |
| 904 | license:asl2.0 ; dotviewer/font/ and some of lib-python/ | 908 | license:asl2.0 ; dotviewer/font/ and some of lib-python/ |
| 905 | license:gpl3+ ; ./rpython/rlib/rvmprof/src/shared/libbacktrace/dwarf2.* | 909 | license:gpl3+ ; ./rpython/rlib/rvmprof/src/shared/libbacktrace/dwarf2.* |
| 906 | license:bsd-3 ; lib_pypy/cffi/_pycparser/ply/ | 910 | license:bsd-3 ; lib_pypy/cffi/_pycparser/ply/ |
| 907 | (license:non-copyleft | 911 | (license:non-copyleft |
