Package Details: python37 3.7.13-1

Git Clone URL: https://aur.archlinux.org/python37.git (read-only, click to copy)
Package Base: python37
Description: Major release 3.7 of the Python high-level programming language
Upstream URL: https://www.python.org/
Keywords: python python3
Licenses: custom
Provides: python
Submitter: 5long
Maintainer: greut (jrd)
Last Packager: greut
Votes: 28
Popularity: 0.82
First Submitted: 2019-11-14 21:23 (UTC)
Last Updated: 2022-03-17 08:28 (UTC)

Required by (10904)

Sources (6)

Latest Comments

tinytangent commented on 2022-04-30 05:15 (UTC) (edited on 2022-04-30 05:15 (UTC) by tinytangent)

The build process succeeded but I noticed that some unit tests seem to fail ([37/40] test_time -- test_tabnanny failed):

0:00:00 load avg: 1.53 Run tests sequentially
0:00:00 load avg: 1.53 [ 1/40] test_array
0:00:00 load avg: 1.49 [ 2/40] test_base64
0:00:01 load avg: 1.49 [ 3/40] test_binascii
0:00:01 load avg: 1.49 [ 4/40] test_binop
0:00:01 load avg: 1.49 [ 5/40] test_bisect
0:00:01 load avg: 1.49 [ 6/40] test_bytes
0:00:04 load avg: 1.49 [ 7/40] test_cmath
0:00:04 load avg: 1.49 [ 8/40] test_codecs
0:00:05 load avg: 1.45 [ 9/40] test_collections
0:00:06 load avg: 1.45 [10/40] test_complex
0:00:07 load avg: 1.45 [11/40] test_dataclasses
0:00:07 load avg: 1.45 [12/40] test_datetime
0:00:13 load avg: 1.33 [13/40] test_decimal
0:00:19 load avg: 1.30 [14/40] test_difflib
0:00:20 load avg: 1.28 [15/40] test_embed
0:00:24 load avg: 1.28 [16/40] test_float
0:00:24 load avg: 1.28 [17/40] test_fstring
0:00:25 load avg: 1.34 [18/40] test_functools
0:00:25 load avg: 1.34 [19/40] test_generators
0:00:26 load avg: 1.34 [20/40] test_hashlib
0:00:27 load avg: 1.34 [21/40] test_heapq
0:00:28 load avg: 1.34 [22/40] test_int
0:00:28 load avg: 1.34 [23/40] test_itertools
0:00:37 load avg: 1.29 [24/40] test_json
0:00:39 load avg: 1.29 [25/40] test_long
0:00:43 load avg: 1.26 [26/40] test_math
0:00:47 load avg: 1.24 [27/40] test_memoryview
0:00:48 load avg: 1.24 [28/40] test_operator
0:00:48 load avg: 1.24 [29/40] test_ordered_dict
0:00:50 load avg: 1.30 [30/40] test_pickle
0:01:09 load avg: 1.23 [31/40] test_pprint
0:01:10 load avg: 1.22 [32/40] test_re
0:01:12 load avg: 1.22 [33/40] test_set
0:01:17 load avg: 1.20 [34/40] test_statistics
0:01:19 load avg: 1.20 [35/40] test_struct
0:01:21 load avg: 1.26 [36/40] test_tabnanny
0:01:21 load avg: 1.26 [37/40] test_time -- test_tabnanny failed
0:01:23 load avg: 1.26 [38/40] test_unicode
0:01:26 load avg: 1.24 [39/40] test_xml_etree
0:01:28 load avg: 1.24 [40/40] test_xml_etree_c

greut commented on 2022-03-24 06:07 (UTC)

@hadian90 I'll let you search how to deal with importing the provided GPG key.

hadian90 commented on 2022-03-24 05:05 (UTC) (edited on 2022-03-24 05:08 (UTC) by hadian90)

failed install on Manjaro

==> Validating source files with sha512sums...
    Python-3.7.13.tar.xz ... Passed
    Python-3.7.13.tar.xz.asc ... Skipped
    dont-make-libpython-readonly.patch ... Passed
    0002-smaller-pgo-test-suite.patch ... Passed
    0003-enable-building-with-libmpdec.patch ... Passed
    0004-mpdecimal-2.5.1.patch ... Passed
==> Verifying source file signatures with gpg...
    Python-3.7.13.tar.xz ... cat: write error: Broken pipe
FAILED
==> ERROR: One or more PGP signatures could not be verified!
Finished with result: exit-code
Main processes terminated with: code=exited/status=1

hwangh95 commented on 2021-11-22 14:03 (UTC)

_decimal module doesn't build without the patch in python38 https://aur.archlinux.org/cgit/aur.git/tree/mpdecimal-2.5.1.patch?h=python38

anatolik commented on 2021-11-19 02:34 (UTC) (edited on 2021-11-19 02:35 (UTC) by anatolik)

It needs rebuild due to libldap bump

bacteriostat commented on 2021-10-20 06:20 (UTC) (edited on 2021-10-20 06:47 (UTC) by bacteriostat)

libffi was upgraded 3.4.2-4 and Jupyter notebook no more launches for me. It is looking for libffi.so.7 while the system has libffi.so.8.

I am not sure if this issue goes here or somewhere upstream.

FIXED: Rebuilding the package fixed the issue for me. Leaving it here for noobs out there like me.

avzb_arch commented on 2021-07-08 06:48 (UTC) (edited on 2021-07-08 06:50 (UTC) by avzb_arch)

Use this works well

gpg --keyserver keyserver.ubuntu.com --recv-key 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D

gpg: key 2D347EA6AA65421D: public key "Ned Deily (Python release signing key)<nad@python.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

jrd commented on 2021-07-03 09:01 (UTC)

I had no problem with this package (in french):

Construction de python37...
==> Création du paquet python37 3.7.11-1 (sam. 03 juil. 2021 11:00:32)
==> Vérification des dépendances pour l’exécution…
==> Vérification des dépendances pour la compilation…
==> Récupération des sources…
  -> Téléchargement de Python-3.7.11.tar.xz…
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 15 16.5M   15 2559k    0     0  6705k      0  0:00:02 --:--:--  0:00:02 6700k
100 16.5M  100 16.5M    0     0  12.2M      0  0:00:01  0:00:01 --:--:-- 12.2M
  -> Téléchargement de Python-3.7.11.tar.xz.asc…
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   833  100   833    0     0  22109      0 --:--:-- --:--:-- --:--:-- 21921
  -> dont-make-libpython-readonly.patch trouvé
  -> 0002-smaller-pgo-test-suite.patch trouvé
  -> 0003-enable-building-with-libmpdec.patch trouvé
==> Validation des fichiers source avec sha512sums…
    Python-3.7.11.tar.xz ... Réussite
    Python-3.7.11.tar.xz.asc ... Ignoré
    dont-make-libpython-readonly.patch ... Réussite
    0002-smaller-pgo-test-suite.patch ... Réussite
    0003-enable-building-with-libmpdec.patch ... Réussite
==> Vérification des signatures des fichiers sources grâce à gpg…
    Python-3.7.11.tar.xz ... Réussite
==> Suppression du répertoire $srcdir/ existant…
==> Extraction des sources…
  -> Extraction de Python-3.7.11.tar.xz avec bsdtar
==> Lancement de prepare()…

greut commented on 2021-07-03 07:48 (UTC)

@Krtko some pacman wrappers are able to import the PGP/GPG keys for you. https://wiki.archlinux.org/title/AUR_helpers#Pacman_wrappers

Afaik, 3.7.11 was signed by the same person/key than the previous one. Sorry for the trouble.

robibert commented on 2021-07-02 13:01 (UTC)

I specified the key server gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D and it worked for me

Krtko commented on 2021-07-01 04:58 (UTC)

:: PGP keys need importing:
 -> 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D, required by: python37

...

==> Verifying source file signatures with gpg...
    Python-3.7.11.tar.xz ... FAILED (unknown public key 2D347EA6AA65421D)
==> ERROR: One or more PGP signatures could not be verified!

greut commented on 2021-01-20 15:42 (UTC)

@user20159 me neither. I've made it more like Python38, let me know if it breaks anything on your side. Thanks for the heads up.

user20159 commented on 2021-01-19 16:46 (UTC)

I'm not sure if this question has been asked already, I've checked the comments but couldn't see anything. How can it be that python37 has llvm gdb xorg-server-xvfb as additional dependencies over python38 or python36? Furthermore, build time is around twice as long as for python38 or python36. Are the other ones missing something?

jhincks commented on 2020-09-28 20:15 (UTC)

build failed with "/usr/bin/xvfb-run: line 186: kill: (1576374) - No such process"

xvfb-run says in its help, that "-a" is deprecated, one should use "-d" instead. I replaced the two occurences in the PKGBUILD, then the build process was successfull.

RealGecko commented on 2020-09-22 08:59 (UTC)

I used this command to import the key

gpg --keyserver pool.sks-keyservers.net --receive-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D

Leeo97one commented on 2020-09-18 20:14 (UTC) (edited on 2020-09-18 20:15 (UTC) by Leeo97one)

I have imported and signed the GPG key: pacman-key --list-keys

pub   rsa4096 2014-11-02 [SC]
      0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
uid          [  totale ] Ned Deily (Python release signing key) <nad@python.org>
uid          [  totale ] Ned Deily (Python release signing key) <nad@acm.org>
uid          [  totale ] Ned Deily <nad@baybryj.net>
uid          [  totale ] keybase.io/nad <nad@keybase.io>
sub   rsa4096 2014-11-02 [E]

But I'm still getting a GPG error and I'm not sure why:

==> Vérification des signatures des fichiers sources grâce à gpg…
    Python-3.7.9.tar.xz ... ÉCHEC (Clé publique inconnue 2D347EA6AA65421D)
==> ERREUR : Une ou plusieurs signatures PGP n’ont pas pu être vérifiées.

greut commented on 2020-09-10 19:45 (UTC)

@DMolt, it make sense to follow what is done for python35 and python36 in that regard and go without ensurepip.

DMolt commented on 2020-09-10 07:59 (UTC)

Hi, I use python 3.7 for some projects with virtualenv and 3.8 for other and system. To install this I have to change --with-ensurepip with --without-ensurepip

Davide

greut commented on 2020-09-07 09:56 (UTC)

@surrealistic above in the logs, you should see why the _posixsubprocess module is not building successfully.

surrealistic commented on 2020-09-07 09:27 (UTC) (edited on 2020-09-07 09:31 (UTC) by surrealistic)

Hi! I'm having this issue with subprocess while tying to upgrade python37 and also after uninstalling it to try a clean installation of it.


gcc -pthread -c -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-function-type -Werror=implicit-function-declaration -fprofile-generate  -I. -I./Include -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -fPIC -DPy_BUILD_CORE -o Modules/_math.o Modules/_math.c
LD_LIBRARY_PATH=/home/user/.cache/yay/python37/src/Python-3.7.9 CC='gcc -pthread' LDSHARED='gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate' OPT='-DNDEBUG -g -fwrapv -O3 -Wall'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''       ./python -E ./setup.py  build
Traceback (most recent call last):
  File "./setup.py", line 12, in <module>
    from distutils.core import Extension, setup
  File "/usr/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 16, in <module>
    from distutils.dist import Distribution
  File "/usr/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 19, in <module>
    from distutils.util import check_environ, strtobool, rfc822_escape
  File "/usr/lib/python3.7/site-packages/setuptools/_distutils/util.py", line 14, in <module>
    from distutils.spawn import spawn
  File "/usr/lib/python3.7/site-packages/setuptools/_distutils/spawn.py", line 11, in <module>
    import subprocess
  File "/home/user/.cache/yay/python37/src/Python-3.7.9/Lib/subprocess.py", line 152, in <module>
    import _posixsubprocess
ModuleNotFoundError: No module named '_posixsubprocess'
make[3]: *** [Makefile:630: sharedmods] Error 1
make[3]: Leaving directory '/home/user/.cache/yay/python37/src/Python-3.7.9'
make[2]: *** [Makefile:523: build_all_generate_profile] Error 2
make[2]: Leaving directory '/home/user/.cache/yay/python37/src/Python-3.7.9'
make[1]: *** [Makefile:499: profile-gen-stamp] Error 2
make[1]: Leaving directory '/home/user/.cache/yay/python37/src/Python-3.7.9'
make: *** [Makefile:511: profile-run-stamp] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: python37

It's like it can't find or recognize subprocess. I searched on Google about the error and I've tried to install subprocess32 with python3.7 -m pip install subprocess32 but it returns the same error. After all those attempts I decided to try a clean installation so I removed python3.7 to install it again instead of upgrading it, but it keeps returning the same error.

jrd commented on 2020-09-03 10:46 (UTC)

Thanks greut, and thanks 5long for initial package.

greut commented on 2020-09-02 19:43 (UTC)

@jrd I've taken the patch from the bug mentioned (https://bugs.python.org/issue41302) and added you as a co-maintainer.

GeorgP commented on 2020-09-02 08:18 (UTC)

You can click "Adopt Package" in "Package Actions" in the top right. Then it's yours. :D

jrd commented on 2020-09-01 12:11 (UTC)

If 5long don't/won't update the package, I could take over if that's possible (I don't know how to transfer AUR package owership…)

jrd commented on 2020-09-01 09:48 (UTC) (edited on 2020-09-01 10:11 (UTC) by jrd)

I made it compile and install with the following diff for PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index 20bd747..5cdcf4e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -47,11 +47,11 @@ prepare() {
   # Speed up LTO
   sed -i -e "s|-flto |-flto=4 |g" configure configure.ac

-  # Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec),
+  # Ensure that we are using the system copy of various libraries (expat, libffi),
   # rather than copies shipped in the tarball
   rm -r Modules/expat
   rm -r Modules/_ctypes/{darwin,libffi}*
-  rm -r Modules/_decimal/libmpdec
+  # Ensure using libmpdec in the tarball as the system one (2.5+) is too new for Python 3.7
 }

 build() {
@@ -69,9 +69,8 @@ build() {
               --with-system-expat \
               --with-dbmliborder=gdbm:ndbm \
               --with-system-ffi \
-              --with-system-libmpdec \
               --enable-loadable-sqlite-extensions \
-              --with-ensurepip
+              --with-ensurepip=install

   # Obtain next free server number for xvfb-run; this even works in a chroot environment.
   export servernum=99

This is because libmpec is now at version 2.5+ in Arch and this is not supported for python version prior to 3.8. So the one bundled within the tarball should be used.

The issue that let me understand the problem: https://bugs.python.org/issue41302

PRAGMA commented on 2020-08-28 19:07 (UTC)

I'm also having the same issue as jrd.

jrd commented on 2020-08-21 12:51 (UTC)

Build fails for me, this seems related to fakeroot. Probably an incompatibility between two LD_LIBRARY_PATH/LD_PRELOAD usages.

First weird messages:

Compiling '/home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/usr/lib/python3.7/zipfile.py'...
PYTHONPATH=/home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/usr/lib/python3.7 LD_LIBRARY_PATH=/home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/src/Python-3.7.8 \
    ./python -E -Wi /home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/usr/lib/python3.7/compileall.py \
    -d /usr/lib/python3.7/site-packages -f \
    -x badsyntax /home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/usr/lib/python3.7/site-packages
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

And last messages before stopping build stage:

Generating grammar tables from /home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar.txt
Writing grammar tables to /home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar3.7.8.final.0.pickle
if test "xupgrade" != "xno"  ; then \
    case upgrade in \
        upgrade) ensurepip="--altinstall --upgrade" ;; \
        install|*) ensurepip="--altinstall" ;; \
    esac; \
    LD_LIBRARY_PATH=/home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/src/Python-3.7.8 ./python -E -m ensurepip \
        $ensurepip --root=/home/cyrille/tmp/yaourt-tmp-cyrille/aur-python37/pkg/python37/ ; \
fi
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Looking in links: /tmp/tmpb0r11wta
Processing /tmp/tmpb0r11wta/setuptools-47.1.0-py3-none-any.whl
Processing /tmp/tmpb0r11wta/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/easy_install'
Consider using the `--user` option or check the permissions.

make: *** [Makefile:1152: altinstall] Error 1

Edgeworth commented on 2020-08-14 02:13 (UTC)

To elaborate on alexz comment, I had to follow the instructions from keybase/nad to import the GPG key

# curl + gpg pro tip: import nad's keys
curl https://keybase.io/nad/pgp_keys.asc | gpg --import

# the Keybase app can push to gpg keychain, too
keybase pgp pull nad

alexz commented on 2020-08-12 20:14 (UTC)

I guess, another fix is to import the public key:

gpg --recv-key 2D347EA6AA65421D

I don't think this package is Out-of-Date ? How do you unflag it?

alexz commented on 2020-08-12 20:03 (UTC) (edited on 2020-08-12 20:10 (UTC) by alexz)

Failing with GPG error, too:

==> Verifying source file signatures with gpg...
    Python-3.7.8.tar.xz ... FAILED (unknown public key 2D347EA6AA65421D)
==> ERROR: One or more PGP signatures could not be verified!
==> ERROR: Makepkg was unable to build python37.

seems to be related to:

validpgpkeys=('0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D')  # Ned Deily (Python release signing key) <nad@python.org>

And this release was signed by somebody else, so for me it works with:

makepkg --skippgpcheck

justicehunter commented on 2020-08-11 08:47 (UTC)

@GhostThreader139 yup, same here. Signature problem

GhostThreader139 commented on 2020-08-09 06:52 (UTC)

Anyone else having a problem with the key, as if it's unknown???

holishing commented on 2020-08-05 12:54 (UTC)

@emanuelfontelles What's your gpg signature's problem? It seems to work ok in my machine

timo42 commented on 2020-07-15 22:25 (UTC) (edited on 2020-07-15 22:26 (UTC) by timo42)

I had exactly the same build error and re-installing the package didn't work for me. However, replacing --with-ensurepip by --without-ensurepip (the other way round as @seyn6gk suggested) in the PKGBUILD fixed it for me. Not sure if changing this option has any unwanted side-effects though.

manofsteal123 commented on 2020-07-12 22:25 (UTC)

"I got the permission denied error reported below when attempting an upgrade but removing the package and reinstalling it worked for me."

I had to remove python37-pillow & python37 in that order and used "makepkg -s" to build the Download snapshot of python37 & python37-pillow in that order

depieri.carlo commented on 2020-07-12 10:29 (UTC)

If it's an upgrade issue, my current package version could help: 3.7.5-2.

mjakob422 commented on 2020-07-12 09:50 (UTC)

I got the permission denied error reported below when attempting an upgrade but removing the package and reinstalling it worked for me.

depieri.carlo commented on 2020-07-11 17:36 (UTC) (edited on 2020-07-11 17:38 (UTC) by depieri.carlo)

The build is failing for me too, both with makepkg and with yay. Can confirm that --with-ensurepip is already there in the PKGBUILD.

ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Generating grammar tables from /home/username/.cache/yay/python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar.txt
Writing grammar tables to /home/username/.cache/yay/python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar3.7.8.final.0.pickle
if test "xupgrade" != "xno"  ; then \
        case upgrade in \
                upgrade) ensurepip="--altinstall --upgrade" ;; \
                install|*) ensurepip="--altinstall" ;; \
        esac; \
        LD_LIBRARY_PATH=/home/username/.cache/yay/python37/src/Python-3.7.8:/usr/local/lib ./python -E -m ensurepip \
                $ensurepip --root=/home/username/.cache/yay/python37/pkg/python37/ ; \
fi
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Looking in links: /tmp/tmppsnsv3pb
Processing /tmp/tmppsnsv3pb/setuptools-47.1.0-py3-none-any.whl
Processing /tmp/tmppsnsv3pb/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/easy_install'
Consider using the `--user` option or check the permissions.

make: *** [Makefile:1152: altinstall] Error 1
==> ERROR: A failure occurred in package().
    Aborting...
error making: %!s(func() string=0x55f1734c1e80)

seyn6gk commented on 2020-07-11 05:36 (UTC)

@5long I've got the PKGBUILD per pikaur -G command, this could be the issue.

5long commented on 2020-07-11 04:22 (UTC)

@seyn6gk: this is confusing. I've already enabled the --with-ensurepip option back in 2019.12. The patch you've attached shouldn't even apply.

seyn6gk commented on 2020-07-10 17:46 (UTC) (edited on 2020-07-10 17:46 (UTC) by seyn6gk)

apply the patch to make python37 to build again, get the idea from python38 package.

--- PKGBUILD    2020-07-10 19:11:46.901072504 +0200
+++ python37/PKGBUILD   2020-07-10 19:41:37.546043677 +0200
@@ -71,7 +71,7 @@
               --with-system-ffi \
               --with-system-libmpdec \
               --enable-loadable-sqlite-extensions \
-              --without-ensurepip
+              --with-ensurepip

   # Obtain next free server number for xvfb-run; this even works in a chroot environment.
   export servernum=99

seyn6gk commented on 2020-07-10 17:09 (UTC)

build with makepkg and pikaur both failed with the error

if test "xupgrade" != "xno"  ; then \
    case upgrade in \
        upgrade) ensurepip="--altinstall --upgrade" ;; \
        install|*) ensurepip="--altinstall" ;; \
    esac; \
    LD_LIBRARY_PATH=/home/username/src/abs/python37/src/Python-3.7.8 ./python -E -m ensurepip \
        $ensurepip --root=/home/username/src/abs/python37/pkg/python37/ ; \
fi
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Looking in links: /tmp/tmpeenbp60f
Processing /tmp/tmpeenbp60f/setuptools-47.1.0-py3-none-any.whl
Processing /tmp/tmpeenbp60f/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/easy_install'
Consider using the `--user` option or check the permissions.

5long commented on 2020-07-10 14:51 (UTC)

Hi, @maln0ir and @javi12

I've verified building this package on my machine with:

1) Raw makepkg -si without any AUR helpers 2) yay -S python37. Yay is a pretty popular AUR helper that I've used before. 3) aur sync -c python37. The aur command is part of aurutils which is what I'm using right now.

all of which works fine. I did notice the object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded error message but the build process eventually finished without problems.

I've noticed that @javi12 is building with pamac, which is an AUR helper that I'm not familiar with at all. You might want to ask for help elsewhere.

javi12 commented on 2020-07-10 10:32 (UTC) (edited on 2020-07-10 10:47 (UTC) by javi12)

Build also fails here...

{{... PYTHONPATH=/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7 LD_LIBRARY_PATH=/var/tmp/pamac-build-momo/python37/src/Python-3.7.8 \ ./python -E -Wi /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/compileall.py \ -d /usr/lib/python3.7/site-packages -f \ -x badsyntax /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/site-packages ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Listing '/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/site-packages'... PYTHONPATH=/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7 LD_LIBRARY_PATH=/var/tmp/pamac-build-momo/python37/src/Python-3.7.8 \ ./python -E -Wi -O /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/compileall.py \ -d /usr/lib/python3.7/site-packages -f \ -x badsyntax /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/site-packages ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Listing '/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/site-packages'... PYTHONPATH=/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7 LD_LIBRARY_PATH=/var/tmp/pamac-build-momo/python37/src/Python-3.7.8 \ ./python -E -Wi -OO /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/compileall.py \ -d /usr/lib/python3.7/site-packages -f \ -x badsyntax /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/site-packages ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Listing '/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/site-packages'... PYTHONPATH=/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7 LD_LIBRARY_PATH=/var/tmp/pamac-build-momo/python37/src/Python-3.7.8 \ ./python -E -m lib2to3.pgen2.driver /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/lib2to3/Grammar.txt ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Generating grammar tables from /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/lib2to3/Grammar.txt Writing grammar tables to /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/lib2to3/Grammar3.7.8.final.0.pickle PYTHONPATH=/var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7 LD_LIBRARY_PATH=/var/tmp/pamac-build-momo/python37/src/Python-3.7.8 \ ./python -E -m lib2to3.pgen2.driver /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar.txt ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Generating grammar tables from /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar.txt Writing grammar tables to /var/tmp/pamac-build-momo/python37/pkg/python37/usr/lib/python3.7/lib2to3/PatternGrammar3.7.8.final.0.pickle if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--altinstall --upgrade" ;; \ install|*) ensurepip="--altinstall" ;; \ esac; \ LD_LIBRARY_PATH=/var/tmp/pamac-build-momo/python37/src/Python-3.7.8 ./python -E -m ensurepip \ $ensurepip --root=/var/tmp/pamac-build-momo/python37/pkg/python37/ ; \ fi ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Looking in links: /tmp/tmp2qn8a9bg Processing /tmp/tmp2qn8a9bg/setuptools-47.1.0-py3-none-any.whl Processing /tmp/tmp2qn8a9bg/pip-20.1.1-py2.py3-none-any.whl Installing collected packages: setuptools, pip Attempting uninstall: setuptools Found existing installation: setuptools 41.2.0 Uninstalling setuptools-41.2.0: ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/easy_install' Consider using the --user option or check the permissions.

make: *** [Makefile:1152: altinstall] Error 1 ==> ERROR: A failure occurred in package(). Aborting...}}

commented on 2020-07-09 21:42 (UTC)

Build fails for me with following error:

...
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Looking in links: /tmp/tmp_ig5xwy3
Processing /tmp/tmp_ig5xwy3/setuptools-47.1.0-py3-none-any.whl
Processing /tmp/tmp_ig5xwy3/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/easy_install'
Consider using the `--user` option or check the permissions.

make: *** [Makefile:1152: altinstall] Error 1

fakeroot package is installed, so libfakeroot.so is available.

kiengcan9999 commented on 2020-05-07 19:38 (UTC)

I failed to install python37 on Manjaro 20.0 Lysia because of error

gpg: keyserver receive failed: general error

I fixed it by

gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D

wjhandley commented on 2020-05-07 14:18 (UTC) (edited on 2020-05-07 14:51 (UTC) by wjhandley)

Currently my build fails with

make[1]: Leaving directory '...' /usr/bin/xvfb-run: line 186: kill: (107983) - No such process

Could you advise which dependency is missing?

Edit: It seems to work with xorg-server-xvfb-dev -- perhaps this should be added as a dependency?

EreTIk commented on 2020-04-27 15:02 (UTC) (edited on 2020-04-27 15:03 (UTC) by EreTIk)

Please add aarch64 architecture (arm64 support):

git diff PKGBUILD 
diff --git a/PKGBUILD b/PKGBUILD
index 35f296c..8aba60b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,8 @@ pkgrel=2
 _pybasever=${pkgver%.*}
 _pymajver=3
 pkgdesc="Major release 3.7 of the Python high-level programming language"
-arch=('x86_64')
+arch=('x86_64'
+      'aarch64')
 license=('custom')
 url="https://www.python.org/"
 depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib' 'libnsl')

Test: Ok

sponrad commented on 2020-04-24 20:14 (UTC) (edited on 2020-04-24 20:20 (UTC) by sponrad)

EDIT I take it back, yay -S python37 --rebuild did fix this for me, if anyone else stumbles on this.

I'm having a similar issue to @somini ever since libffi was updated on 2020-04-11. Rebuilding as is has not helped me fix this one I think we do need a bump here?

>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.6: cannot open shared object file: No such file or directory

somini commented on 2020-04-17 21:55 (UTC) (edited on 2020-04-17 21:55 (UTC) by somini)

@5long Of course I can (I did), but for people with the old version this will break, and rebuilding doesn't help since the pkgrel doesn't change.

5long commented on 2020-04-14 10:26 (UTC)

@craynic: The PGP key in PKGBUILD is correct. PKGBUILD requires validpgpkeys to be an array of PGP fingerprints, while 2D347EA6AA65421D is the ID (not fingerprint) of the correct key.

@somini: you can just rebuild manually. See: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages

somini commented on 2020-04-13 15:14 (UTC)

This needs a pkgrel bump since libffi was updated.

craynic commented on 2020-04-11 15:19 (UTC)

The PGP key declared in the PKGBUILD seems invalid. The correct one is 2D347EA6AA65421D. Ref: https://www.python.org/downloads/#pubkeys

vit commented on 2020-04-08 17:53 (UTC)

I'm getting failed tests during PGO stage of compilation. Is this normal?

MarcinWieczorek commented on 2020-02-02 14:32 (UTC)

@tyreq I'm trying the fix rn. 3.7's site packages could be left because of use of pip install with sudo. Check if any package owns the files - also not updated python-* packages from AUR.

tyerq commented on 2020-01-31 10:36 (UTC)

@yurikoles @MarcinWieczorek @MangoMan had the same problem. it seems that --with-ensurepip=upgrade (default) in ./configure/ Python tried to delete the previously intalled pip to reinstall it's bundled version (via pip itself) and failed, since it's lacking permissions in /usr/lib/python37/

Changing --with-ensurepip in PKGBUILD:79 to --with-ensurepip=install just keeps the already installed pip and goes on succesfully

Requirement already satisfied: pip in /usr/lib/python3.7/site-packages (19.0.3)

Some further thoughts: I've had arch's system python upgrade from 3.7 to 3.8, but it kept /usr/lib/python3.7/site-packages for some reason. Don't know if that is intended or not, but it resulted in this behaviour.

MangoMan commented on 2020-01-29 21:01 (UTC)

I have a similar issue like MarcinWieczorek

Ivellios commented on 2020-01-10 04:45 (UTC)

@dspati Cool. Thanks!

yurikoles commented on 2020-01-08 10:32 (UTC)

@MarcinWieczorek do you have something similar with other AUR packages? Because it seems to be a local issue.

MarcinWieczorek commented on 2020-01-08 10:22 (UTC)

I'm getting an error:

ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Looking in links: /tmp/tmpl85ku1xr
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/bin/pip'
Consider using the `--user` option or check the permissions.

I have fakeroot installed.

ajkswamy commented on 2020-01-01 13:47 (UTC)

@Ivellios Please have a look at the comment by '5long' at 2019-11-15 15:05, a few pages down.

Ivellios commented on 2019-12-30 04:43 (UTC)

==> Verifying source file signatures with gpg... Python-3.7.6.tar.xz ... FAILED (unknown public key 2D347EA6AA65421D)

5long commented on 2019-12-11 13:57 (UTC)

@yurikoles

Running tests in check() is to check for correctness. Running tests with ./configure --enable-optimizations is for, literally, optimizations. They are different things. It's impossible to move ./configure --enable-optimizations into check() without breaking the build.

yurikoles commented on 2019-12-10 20:04 (UTC)

@5long

why don't you use PKGBUILD check function for test? It's straightforward to then --nocheck

5long commented on 2019-12-10 18:44 (UTC)

@yurikoles: I just pushed 3.7.5-3 to AUR. Now the test suite to run is a lot smaller (from 400+ tests to 40) and the building time is cut down to roughly 1/4. Incidently, the potentially hanging test test_socket is now skipped by default.

If you really want to skip the tests, you can remove the --enable-optimizations option from ./configure. But beware that this will build a less performant Python. See https://stackoverflow.com/q/41405728 for an explaination.

yurikoles commented on 2019-12-10 18:03 (UTC)

How to disable tests during build?

5long commented on 2019-12-08 15:53 (UTC)

@PeteAnderson: I'm not quite sure what are you trying to achieve. Your sed command added in prepare() will fail, since Makefile isn't generated yet before running ./configure

Suppose the sed command will succeed (say, added in build() right before running make), it'll append a dangling -x in the test command missing a required test module name and make the test command fail instantly, effectively skipping the whole test suite.

Besides, the whole point of PGO build is to run the test suite first, watch how the code behaves and optimize accordingly. If we're trying to skip running the tests, it'll no longer be a PGO build and we might as well just remove --enable-optimizations altogether.

PeteAnderson commented on 2019-12-06 22:15 (UTC)

I found this in the makefile:

# The task to run while instrumented when building the profile-opt target.
# We exclude unittests with -x that take a rediculious amount of time to
# run in the instrumented training build or do not provide much value.
PROFILE_TASK=-m test.regrtest --pgo

But whoever wrote the comment must have forgotten to actually add -x to the command. So I added this to PKGBUILD in prepare():

  sed -i -Ee 's|(PROFILE_TASK=-m test.regrtest --pgo)|\1 -x|' Makefile

This avoids running the tests while still building an optimized build, and gave me a functional 3.7 build in about 10 minutes.

yurikoles commented on 2019-11-27 11:29 (UTC)

sorry for false-flag

5long commented on 2019-11-25 12:10 (UTC)

@Fuzzy: Yes, building with --enable-optimizations does run tests due to PGO optimization. Maybe I'll just remove this ./configure option in the next version of PKGBUILD (but I haven't decided yet).

About the missing _ctypes module: you can try building the package in a clean chroot, which is explained in the wiki: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_clean_chroot This isn't trivial to setup and it will take up a fair bit of disk space. But it should solve most problems of "package builds differently on different machines".

Fuzzy commented on 2019-11-25 04:49 (UTC)

Hi! First, thanks for this package. I also ran into troubles with last arch upgrade... But: I don't see check() section in my PKGBUILD but somehow tests are ran. There are several failed tests but worse - 'test_socket' gets stuck. I had removed --enable-optimizations and yay built and installed it successfully. At first look it works but now I have another error: No module named '_ctypes' (pacman shows that I have libffi installed...)

5long commented on 2019-11-20 15:36 (UTC) (edited on 2019-11-20 16:15 (UTC) by 5long)

I'm seriously considering bumping the pkgrel for a bunch of changes:

  • --with-threads is no longer recognized, which should be removed. No questions with that.

  • Enable --with-ensurepip. For now, I don't see building --without-ensurepip could yield any benefits. The ensurepip module and .whls of setuptools & pip are installed anyway even when building --without-ensurepip. It's just the bundled .whls might become out of date in the future, which doesn't meet Arch's "only run latest software" guideline.

  • Running tests (either in check() or building with --enable-optimizations) seems to be causing trouble for some people. Building with --enable-optimizations claims to boost performance for 10% ~ 20% (1). Personally I don't quite care about Python's performance on my dev machine that much. Another problem is: the test suite could run for as long as 30+ minutes, which is pretty slow comparing with other AUR packages that I use. But I'm guessing that people might expect this package to be "just like python in the official repo", which is built with --enable-optimizations enabled. So I still haven't decided on this yet.

maria.v commented on 2019-11-20 04:29 (UTC)

@leandro: for pip3.7 you can edit PKGBUILD to replace --without-ensurepip with --with-ensurepip and rebuild the package.

5long commented on 2019-11-18 14:45 (UTC)

@MuffinBomber: I'm no expert in building Python. Maybe the test case you are stuck on is a different test case. Not the one removed in https://bugs.python.org/issue34587.

And yes: by removing the line of --enable-optimizations from PKGBUILD, a clean rebuild (with makepkg -Csf) no longer runs the tests on my machine.

MuffinBomber commented on 2019-11-18 11:23 (UTC) (edited on 2019-11-18 11:37 (UTC) by MuffinBomber)

When building the package 'test_socket' gets stuck. Is there a way to solve this or should I just remove the '--enable-optimizations' line and skip the tests completely (while also dealing with slower executing code)?

EDIT: According to https://bugs.python.org/issue34587 that test was removed from 3.7, but somehow it is still present?

Lucki commented on 2019-11-16 14:55 (UTC)

Thanks for your insights. I'm no expert especially with python.

My package doesn't run with 3.8 anymore and upstream is (nearly) dead. Looks like this will be a bigger task to get it run again.

5long commented on 2019-11-16 13:58 (UTC)

@Lucki: I'm not quite sure if this pacakges should claim provides=... in its PKGBUILD.

Python packages are, in a way, built for a specific version of Python. Most of their files are installed into /usr/lib/pythonX.Y and they won't run under a different version of Python. If a package only runs under Python 3.7, I'd suggest it claims python37 as its dependency. The Python version is hard-coded in the package name already.

Another problem is: only Arch's official python package provides /usr/bin/python. Other packages must not do that. Even if python37 does provides=python<3.8, any python scripts starting with #!/usr/bin/python won't run. So the provides=... just become a false promise. This whole situation may be resolved once pacman implements an alternatives system (which is being discussed here: https://lists.archlinux.org/pipermail/pacman-dev/2019-October/023691.html) in the future.

But still, this is my first time writing a "serious" PKGBUILD. And by writing I mean "copying from official repo and python36". What I've said above may very well be wrong. Feel free to point out any mistakes.

Lucki commented on 2019-11-16 12:52 (UTC) (edited on 2019-11-16 12:54 (UTC) by Lucki)

Isn't this providing python<3.8 or similar?

https://wiki.archlinux.org/index.php/PKGBUILD#provides

chrismax commented on 2019-11-16 10:21 (UTC)

@5long Thanks for updating the build file. Now it's working for me without any troubles.

lainproliant commented on 2019-11-15 22:53 (UTC)

@nitrobay Please try what @5long did below. You will need to download the PKGBUILD file yourself, then remove the check() section, then run makepkg -s. I ran into the issue that some post-build unit tests refused to pass, and removing the check() section allowed me to proceed successfully.

nitrobay commented on 2019-11-15 15:05 (UTC)

Even with the very latest version of the aur database, tests are runned despite !test in my makpkg.conf ! Very huge deal I cannot work because I've done the very big mistake of updating everything including python so now the tools used for my work does not work. I will never use arch linux again. It is so stupid you cannot downgrade with it !!!!!!!!! Such a basic feature make the PC unusable. Any update can just break your workflow forever and then you cannot work. I hate arch linux.

5long commented on 2019-11-15 14:05 (UTC)

@ashep: you might wanna manually import the GPG key from the upstream maintainer. See the wiki: https://wiki.archlinux.org/index.php/PKGBUILD#validpgpkeys for how to do it.

Also, if you're using some kind of AUR helper (in my case, it's yay), it should automatically import the GPG key for you.

5long commented on 2019-11-15 14:03 (UTC)

Thanks for all your feed back. I just removed the check() section with 3.7.5-2.

At first I thought that it's up to the users who decide if they would run check() or not when building a package. You can skip the check() phase in makepkg.conf(5). What drives me made the decision is: some of the tests just don't pass and I probably can't fix them anyway.

But still, the tests are gonna run in build() phase since the default build method is "PGO build", which is still kinda slow.

chrismax commented on 2019-11-15 13:21 (UTC)

@Nomalag I also noticed this when I switched back to python36.

Nomalag commented on 2019-11-15 12:07 (UTC)

Is the check section really necessary? The python36 doesn't have it and the tests take more than an hour on my machine.

chrismax commented on 2019-11-15 09:59 (UTC)

Hi thanks for submitting this python package :) During the build I encountered this failure:

== Tests result: FAILURE ==

395 tests OK.

1 test failed: test_curses

9 tests skipped: test_devpoll test_kqueue test_msilib test_ossaudiodev test_startfile test_winconsoleio test_winreg test_winsound test_zipfile64

Total duration: 23 min 56 sec Tests result: FAILURE

ashep commented on 2019-11-15 02:40 (UTC) (edited on 2019-11-15 02:40 (UTC) by ashep)

==> Validating source files with sha512sums... Python-3.7.5.tar.xz ... Passed Python-3.7.5.tar.xz.asc ... Skipped dont-make-libpython-readonly.patch ... Passed 0001-compileall-Fix-ddir-when-recursing.patch ... Passed ==> Verifying source file signatures with gpg... Python-3.7.5.tar.xz ... FAILED (unknown public key 2D347EA6AA65421D) ==> ERROR: One or more PGP signatures could not be verified! ==> ERROR: Makepkg was unable to build python37.