From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KGBYAS4YDGEjIAEAgWs5BA (envelope-from ) for ; Thu, 05 Aug 2021 18:56:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CP+cOC0YDGF8QgAAB5/wlQ (envelope-from ) for ; Thu, 05 Aug 2021 16:56:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 495DDA64C for ; Thu, 5 Aug 2021 18:56:13 +0200 (CEST) Received: from localhost ([::1]:45430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBgfE-0007O4-Ay for larch@yhetil.org; Thu, 05 Aug 2021 12:56:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBgf4-0007Ku-9L for guix-patches@gnu.org; Thu, 05 Aug 2021 12:56:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBgf4-0006kf-3L for guix-patches@gnu.org; Thu, 05 Aug 2021 12:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBgf4-0002zN-2Q for guix-patches@gnu.org; Thu, 05 Aug 2021 12:56:02 -0400 Subject: bug#44656: [PATCH] Upgrade pypy3 Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 16:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 44656 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Lars-Dominik Braun Cc: 44656-done@debbugs.gnu.org Mail-Followup-To: 44656@debbugs.gnu.org, maxim.cournoyer@gmail.com, lars@6xq.net Received: via spool by 44656-done@debbugs.gnu.org id=D44656.162818250711413 (code D ref 44656); Thu, 05 Aug 2021 16:56:01 +0000 Received: (at 44656-done) by debbugs.gnu.org; 5 Aug 2021 16:55:07 +0000 Received: from localhost ([127.0.0.1]:48266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBge1-0002xO-31 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 12:55:07 -0400 Received: from mail-qv1-f48.google.com ([209.85.219.48]:40793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBgdy-0002xB-Fz for 44656-done@debbugs.gnu.org; Thu, 05 Aug 2021 12:54:55 -0400 Received: by mail-qv1-f48.google.com with SMTP id s11so3292729qvz.7 for <44656-done@debbugs.gnu.org>; Thu, 05 Aug 2021 09:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=qtcFmqQ9HTCo+f6qbizMSLeKIbvzkwyGmh3GoWuGcVo=; b=SNqoxCOB13SGT+MfZp0bnaS2dULBGHiWRRhJKgZB+LhivriwlYIHZRNtK4YMYvjdMX b6Y0ePgokE/Re4DdFsM6iJWHiPLpzCgTdbUW5QwUGaUvV70yqzhj91/XPKL0TrN7Od0F DJv1/IC9d+HBlNRc+TAIuBiCbhYTZ3iyHMqI8uQTWGKolqrh0J4O82D5ecKKKKWnSGn1 TBw1tZ5GiVK2Ndl9gZFfdoosmjMXixWMQ4QMA2NXyiphEJFKebSflcr6dzeqwUAyJ9cL zxXb728jtTY2QiNbrimy2qMU6KB4MkUzU5iOKUOlzES1lEu8N6Q1tUosOs1QoDLp+/Uz A4Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=qtcFmqQ9HTCo+f6qbizMSLeKIbvzkwyGmh3GoWuGcVo=; b=S9ZMnmmIJsfkVmlipZ6YHOYk8YzQU8JCj5E2es1AUmGKHfIAh/Nj885zEhcVPjWD/t Z7uajPieEJU7oqlANTmL4LzqNW1QEzbpaiN+TcX4lKZD+eh0h7HLUB4HoZUazHRf/+Yi Q030Rmr5PMpjGx9COSABTEtd19FASYAT/u8m1M5B9MND61UZ7ZmxxGTKoaLDIvJbTzqR pZwQKza6vJ24GsKhPKK4kEdmpluovUknYrlPjuQtyC2BTuwikavD0UMkdkKsyRBBwcWy BuwMrBkAA5tFoRNsyIJKyY8Ao4PmUMcIMkM7P4lzrxmmMBMjiB76Cy/oOkhGZYO7VLIy qfqA== X-Gm-Message-State: AOAM531BthUP9iagUBkymHmwuypAxljNMtnzkJ4Y2MHCOh5xmBdoSiAe bhxh5PDZhV88gXVt7Ak9tMb2SQEaZ18r3yDp X-Google-Smtp-Source: ABdhPJyZ958qWeXJuhvLHdWUdyjQCC6OacDkTBUdVHGlJ4v88qPVlhI5QKA/BLEOJRrU5BBFnzryUA== X-Received: by 2002:ad4:5fcd:: with SMTP id jq13mr6296167qvb.57.1628182488616; Thu, 05 Aug 2021 09:54:48 -0700 (PDT) Received: from raisin ([2607:fad8:4:6:235e:8579:8464:aacc]) by smtp.gmail.com with ESMTPSA id b23sm3145776qkl.113.2021.08.05.09.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 09:54:48 -0700 (PDT) From: Maxim Cournoyer References: <20201115123911.GA1956@noor.fritz.box> <87eeba8ay7.fsf@gmail.com> Date: Thu, 05 Aug 2021 12:54:47 -0400 In-Reply-To: <87eeba8ay7.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 03 Aug 2021 17:39:28 -0400") Message-ID: <877dgz96i0.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628182573; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qtcFmqQ9HTCo+f6qbizMSLeKIbvzkwyGmh3GoWuGcVo=; b=q7rULcD5JEh24LjpO8m3xBTIFFaFMcd2p5Tr9/ZkCb6jSOBVYJjUPxByKqRu+j3m2H9rI8 /lXF50S1wisLSF0iBPV/rX7/3ZQ/84jBhKntAcTACqqovCiTZcjqMyc6HJd8JOxrRGF57B YZ30KpPmIDgHbJXvnX8qoF9u03rSMx78s4pOHKzE4Dp6bxCvJ20f5+UsQ9T/ABWgQtIuvX swqRj3cGXj6wO1H7HrhAiI/KGlxZ7JwGlyd0GM6OWdxbszWILClTrqH69ZbkDafZUlhFh9 udt2YIuaWkNU0w5uOcTAUsvD6oqw8AJIBlslFLHW2a+16Q920CULoH4Dem1CsQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628182573; a=rsa-sha256; cv=none; b=e7xXJYJSkwN+uj8oVhRb82YEPlfKkC2dZqJs+y+Ay8Bx69fJRPwKYVpTDEvXtFWRNi9lx8 pJySs88jBxsYQ1z3qxAkUVk5PE+Ug31haYxnljfhDmq7Ha+VmG4DKULJwvow9qrav1cdpZ +M/Qz0PeeEJhFqKw7G4mKY8lTHjLbh8hhf3vtWXf1TWIiO67DPRnOTuQJic9HwFtT0B1W1 gktcipDjrUzD+soNlginU1zmj4AecfSKaVvN9zqXzui5RQuxTmtJWwdXYp85z4GA5XAdRU UQ/lZncVEOLcT/vEqlFq1SH9C6IldUubt/w3ApMCdggXYqVcCjNi2RZM4q7k3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=SNqoxCOB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=SNqoxCOB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 495DDA64C X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: sZhgEjjzhLql Hello again, Maxim Cournoyer writes: > Hi Lars, > > Lars-Dominik Braun writes: > >> Hi, >> >> the first patch in this series upgrades pypy3 to 7.3.2 and the second >> adjusts several aspects of the package. >> >> Lars >> >> >>>>>From caf5e4bf9acd10f91de2e6a9c60185475144a1b9 Mon Sep 17 00:00:00 2001 >> From: Lars-Dominik Braun >> Date: Sun, 15 Nov 2020 10:54:26 +0100 >> Subject: [PATCH 2/2] gnu: pypy3: Various package fixes. >> >> * gnu/packages/python.scm (pypy3) [patches]: Add new patch. >> [inputs]: Remove bash-minimal and add nss-certs. >> [native-inputs]: Remove nss-certs here. > > In Guix we leave the choice of the TLS certs to the users; meaning we > don't hard-code their location in packages and instead have the users > explicitly install them (and in the case of OpenSSL, set the necessary > environment variables), the same we do for icons and other 'choosable' > things; while convenient the above goes against this tradition. > >> [arguments]: Use gdbm compat library, add 2to3 binary. >> [native-search-paths]: Add search path. >> * gnu/packages/patches/pypy3-7.3.1-ssl-paths.patch: New file. >> * gnu/local.mk: Add it. >> --- >> gnu/local.mk | 1 + >> .../patches/pypy3-7.3.1-ssl-paths.patch | 41 +++++++ >> gnu/packages/python.scm | 109 ++++++++++++------ >> 3 files changed, 116 insertions(+), 35 deletions(-) >> create mode 100644 gnu/packages/patches/pypy3-7.3.1-ssl-paths.patch >> >> diff --git a/gnu/local.mk b/gnu/local.mk >> index 91a3295e75..b644391a11 100644 >> --- a/gnu/local.mk >> +++ b/gnu/local.mk >> @@ -1536,6 +1536,7 @@ dist_patch_DATA =3D \ >> %D%/packages/patches/python-unittest2-remove-argparse.patch \ >> %D%/packages/patches/python-waitress-fix-tests.patch \ >> %D%/packages/patches/pypy3-7.3.1-fix-tests.patch \ >> + %D%/packages/patches/pypy3-7.3.1-ssl-paths.patch \ >> %D%/packages/patches/qemu-build-info-manual.patch \ >> %D%/packages/patches/qemu-glibc-2.27.patch \ >> %D%/packages/patches/qrcodegen-cpp-make-install.patch \ >> diff --git a/gnu/packages/patches/pypy3-7.3.1-ssl-paths.patch b/gnu/pack= ages/patches/pypy3-7.3.1-ssl-paths.patch >> new file mode 100644 >> index 0000000000..d21133b4ae >> --- /dev/null >> +++ b/gnu/packages/patches/pypy3-7.3.1-ssl-paths.patch >> @@ -0,0 +1,41 @@ >> +Fix default certificate search path, still allowing the user to overrid= e it >> +with environment variables. >> + >> +--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py >> ++++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py >> +@@ -1679,20 +1679,9 @@ def get_default_verify_paths(): >> + https://golang.org/src/crypto/x509/root_linux.go (for the files) >> + ''' >> + certFiles =3D [ >> +- "/etc/ssl/certs/ca-certificates.crt", # Debian/= Ubuntu/Gentoo etc. >> +- "/etc/pki/tls/certs/ca-bundle.crt", # Fedora/= RHEL 6 >> +- "/etc/ssl/ca-bundle.pem", # OpenSUSE >> +- "/etc/pki/tls/cacert.pem", # OpenELEC >> +- "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", # CentOS/= RHEL 7 >> +- "/etc/ssl/cert.pem", # Alpine = Linux >> + ] >> + certDirectories =3D [ >> +- "/etc/ssl/certs", # SLES10/SLES11 >> +- "/system/etc/security/cacerts", # Android >> +- "/usr/local/share/certs", # FreeBSD >> +- "/etc/pki/tls/certs", # Fedora/RHEL >> +- "/etc/openssl/certs", # NetBSD >> +- "/var/ssl/certs", # AIX >> ++ "@GUIX_CERT_PATH@", >> + ] >> + >> + # optimization: reuse the values from a local varaible >> +@@ -1707,9 +1696,10 @@ def get_default_verify_paths(): >> + ofile =3D _cstr_decode_fs(lib.X509_get_default_cert_file()) >> + odir =3D _cstr_decode_fs(lib.X509_get_default_cert_dir()) >> + >> +- if os.path.exists(ofile) and os.path.exists(odir): >> +- get_default_verify_paths.retval =3D (ofile_env, ofile, odir_en= v, odir) >> +- return get_default_verify_paths.retval >> ++ if not os.path.exists(ofile): >> ++ ofile =3D None >> ++ if not os.path.exists(odir): >> ++ odir =3D None >> + >> + # OpenSSL didn't supply the goods. Try some other options >> + for f in certFiles: > > As mentioned above, the choice of certs should not be hard coded the in > the package definition. The correct behavior of honoring SSL_CERT_DIR > and SSL_CERT_FILE environment variables, and falling back to the system > provided location is sane, so the above patch is unwelcome, IMHO. > >> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm >> index 8ef8ae2e1d..c0bd3335e3 100644 >> --- a/gnu/packages/python.scm >> +++ b/gnu/packages/python.scm >> @@ -696,7 +696,8 @@ ease from the desktop to a microcontroller or embedd= ed system.") >> (sha256 >> (base32 >> "03f1fdw6yk2mypa9pbmgk26r8y1hhmw801l6g36zry9zsvz7aqgx")) >> - (patches (search-patches "pypy3-7.3.1-fix-tests.patch")))) >> + (patches (search-patches "pypy3-7.3.1-fix-tests.patch" >> + "pypy3-7.3.1-ssl-paths.patch")))) >> (build-system gnu-build-system) >> (native-inputs >> `(("python-2" ,python-2) >> @@ -704,13 +705,13 @@ ease from the desktop to a microcontroller or embe= dded system.") >> ("tar" ,tar) ; Required for package.py >> ("python2-pycparser" ,python2-pycparser) >> ("python2-hypothesis" ,python2-hypothesis) >> - ("nss-certs" ,nss-certs) ; For ssl tests >> ("gzip" ,gzip))) >> (inputs >> `(("libffi" ,libffi) >> ("zlib" ,zlib) >> ("ncurses" ,ncurses) >> ("openssl" ,openssl) >> + ("nss-certs" ,nss-certs) ; For ssl module > > This change is not needed without the TLS patching above. > >> ("expat" ,expat) >> ("bzip2" ,bzip2) >> ("sqlite" ,sqlite) >> @@ -718,10 +719,9 @@ ease from the desktop to a microcontroller or embed= ded 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 f= ailing. >> + `(#:tests? #f ;FIXME: Disabled for now, there are many tests faili= ng. >> #:modules ((ice-9 ftw) (ice-9 match) >> (guix build utils) (guix build gnu-build-system)) >> #:phases (modify-phases %standard-phases >> @@ -750,6 +750,11 @@ ease from the desktop to a microcontroller or embed= ded 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=E2=80=99t= need to pull in bdb >> + (("ctypes.util.find_library\\('db'\\)") >> + (string-append "'" (assoc-ref inputs "gdbm") >> + "/lib/libgdbm_compat.so'"))) > > OK. > >> (substitute* '("lib_pypy/_sqlite3_build.py") >> ;; Always use search paths >> (("sys\\.platform\\.startswith\\('freebsd'\\)")= "True") >> @@ -761,11 +766,18 @@ ease from the desktop to a microcontroller or embe= dded system.") >> "/lib/libsqlite3.so.0'"))) >> (substitute* '("lib-python/3/subprocess.py") >> ;; Fix shell path >> - (("/bin/sh") >> - (string-append (assoc-ref inputs "bash-minimal= ") "/bin/sh"))) >> + (("/bin/sh") (which "sh"))) > > OK. > >> (substitute* '("lib-python/3/distutils/unixccompi= ler.py") >> ;; gcc-toolchain does not provide symlink cc ->= gcc >> (("\"cc\"") "\"gcc\"")) >> + (substitute* '("lib_pypy/_cffi_ssl/_stdssl/__init= __.py") >> + ;; Add nss-certs to default certificate search = path, >> + ;; otherwise every packages has to specify nss-= certs and >> + ;; openssl as input to set the proper env varia= bles. >> + ;; Depends on -ssl-paths.patch. >> + (("@GUIX_CERT_PATH@") >> + (string-append (assoc-ref inputs "nss-certs") >> + "/etc/ssl/certs"))) > > Not every package; the required SSL environment variables it should be > set in the environment by the user or by via a native search path, and > the certs manually provided (installed) by the user. > >> #t)) >> (add-after >> 'unpack 'set-source-file-times-to-1980 >> @@ -785,7 +797,8 @@ ease from the desktop to a microcontroller or embedd= ed system.") >> (string-append "--make-jobs=3D" >> (number->string (paralle= l-job-count))) >> "-Ojit" >> - "targetpypystandalone")) >> + "targetpypystandalone" >> + "--allworkingmodules")) >> ;; Build c modules and package everything, so tes= ts work. >> (with-directory-excursion "pypy/tool/release" >> (unsetenv "PYTHONPATH") ; Do not use the system= =E2=80=99s python libs: >> @@ -793,7 +806,12 @@ ease from the desktop to a microcontroller or embed= ded system.") >> ; attribute 'IntFlag' >> (invoke "python2" "package.py" >> "--archive-name" "pypy-dist" >> - "--builddir" (getcwd))))) >> + "--builddir" (getcwd)) >> + ;; install pip and setuptools into the dist dir= ectory. >> + ;; XXX: Breaks virtualenv, because it does not = set +w >> + ;; on files copied from the store. >> + ;(invoke "pypy-dist/bin/pypy3" "-m" "ensurepip") >> + ))) > > Since the above attempt to bundle pip failed and is new, I'd just leave > it out. > >> (replace 'check >> (lambda* (#:key tests? #:allow-other-keys) >> (if tests? >> @@ -811,32 +829,54 @@ ease from the desktop to a microcontroller or embe= dded system.") >> #t)) >> (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-pyt= hon/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/encoding= s/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 "ou= t") "/bin/pypy3")))) >> - (copy-recursively "pypy-dist" (assoc-ref output= s "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-pyp= y3)) >> + (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-88= 59-1")) >> + (substitute* '("lib_pypy/_md5.py" >> + "lib_pypy/_sha1.p= y") >> + ((shebang-match-python) sheban= g-pypy3)))) >> + (copy-recursively dist-dir out) >> + ;; Make sure pypy3 is callable as python/python= 3, so we >> + ;; don=E2=80=99t have to patch every single pac= kage. >> + (symlink bin-pypy3 (string-append out "/bin/pyt= hon")) >> + (symlink bin-pypy3 (string-append out "/bin/pyt= hon3")) >> + ;; 2to3 is missing from pypy3, create it. >> + (let ((2to3 (string-append out "/bin/2to3"))) >> + (call-with-output-file 2to3 >> + (lambda (port) >> + (format port "#!~a~%" (string-append out = "/bin/pypy3")) >> + (format port " >> +import sys >> +from lib2to3.main import main >> + >> +sys.exit(main('lib2to3.fixes'))"))) >> + (chmod 2to3 #o755)) >> + #t)))))) > > I'm unconvinced about the above symlinks; it seems preferable for users > to be able to unambiguously run both pypy3 and python3 (cpython) in the > same profile without conflicts. The pypy3 package on Debian contains > the following, for example: > > $ apt-file show pypy3 > pypy3: /usr/bin/pypy3 > pypy3: /usr/bin/pypy3clean > pypy3: /usr/bin/pypy3compile > pypy3: /usr/lib/libpypy3-c.so > pypy3: /usr/lib/pypy3/bin/libpypy3-c.so > pypy3: /usr/lib/pypy3/bin/pypy3-c > pypy3: /usr/lib/pypy3/include/pypy_decl.h > pypy3: /usr/lib/pypy3/include/pypy_macros.h > pypy3: /usr/lib/pypy3/include/pypy_marshal_decl.h > pypy3: /usr/lib/pypy3/include/pypy_structmember_decl.h > pypy3: /usr/lib/pypy3/lib_pypy/_audioop_cffi.pypy36-pp73-x86_64-linux-gnu= .so > pypy3: /usr/lib/pypy3/lib_pypy/_blake2/_blake2b_cffi.pypy36-pp73-x86_64-l= inux-gnu.so > pypy3: /usr/lib/pypy3/lib_pypy/_blake2/_blake2s_cffi.pypy36-pp73-x86_64-l= inux-gnu.so > pypy3: /usr/lib/pypy3/lib_pypy/_curses_cffi.pypy36-pp73-x86_64-linux-gnu.= so > pypy3: /usr/lib/pypy3/lib_pypy/_decimal_cffi.pypy36-pp73-x86_64-linux-gnu= .so > pypy3: /usr/lib/pypy3/lib_pypy/_gdbm_cffi.pypy36-pp73-x86_64-linux-gnu.so > pypy3: /usr/lib/pypy3/lib_pypy/_lzma_cffi.pypy36-pp73-x86_64-linux-gnu.so > pypy3: /usr/lib/pypy3/lib_pypy/_pwdgrp_cffi.pypy36-pp73-x86_64-linux-gnu.= so > pypy3: /usr/lib/pypy3/lib_pypy/_pypy_openssl.pypy36-pp73-x86_64-linux-gnu= .so > pypy3: /usr/lib/pypy3/lib_pypy/_resource_cffi.pypy36-pp73-x86_64-linux-gn= u.so > pypy3: /usr/lib/pypy3/lib_pypy/_sha3/_sha3_cffi.pypy36-pp73-x86_64-linux-= gnu.so > pypy3: /usr/lib/pypy3/lib_pypy/_sqlite3_cffi.pypy36-pp73-x86_64-linux-gnu= .so > pypy3: /usr/lib/pypy3/lib_pypy/_syslog_cffi.pypy36-pp73-x86_64-linux-gnu.= so > pypy3: /usr/share/doc/pypy3/TODO.Debian > pypy3: /usr/share/doc/pypy3/changelog.Debian.gz > pypy3: /usr/share/doc/pypy3/copyright > pypy3: /usr/share/lintian/overrides/pypy3 > pypy3: /usr/share/man/man1/pypy3.1.gz > >> + (native-search-paths >> + (list (search-path-specification >> + (variable "PYTHONPATH") >> + (files '("lib/pypy3.6/site-packages"))))) > > About this search path, how it is supposed to work? The version is > wrong (3.6) and the package doesn't include this directory, and we do > not have a pypy build system or other pypy packages that would make use > of it. Am I missing something? > > Thank you! > > Maxim I've upgraded pypy to version 7.3.5 and pushed the non-controversial changes from your 'small fixes' commit above as 7e05fda6e8dd72b63009181072a282ad15c25c4f. We can fix the search path after the next core-updates merge, where we'll be able to uniformize how it works with Python (GUIX_PYTHONPATH). Thanks, Closing. Maxim