Package Details: python37 3.7.17-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: 32
Popularity: 0.197558
First Submitted: 2019-11-14 21:23 (UTC)
Last Updated: 2023-06-14 07:53 (UTC)

Dependencies (16)

Required by (12594)

Sources (6)

Latest Comments

« First ‹ Previous 1 .. 3 4 5 6 7 8 9 10 Next › Last »

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.