Package Details: python2 2.7.18-11

Git Clone URL: https://aur.archlinux.org/python2.git (read-only, click to copy)
Package Base: python2
Description: A high-level scripting language
Upstream URL: https://www.python.org/
Licenses: PSF-2.0
Conflicts: python
Submitter: jelly
Maintainer: micwoj92
Last Packager: micwoj92
Votes: 74
Popularity: 1.95
First Submitted: 2022-09-23 10:01 (UTC)
Last Updated: 2024-06-17 22:01 (UTC)

Required by (1132)

Sources (4)

Pinned Comments

Latest Comments

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

eniac commented on 2023-01-27 07:00 (UTC)

I'm still at 2.7.18-7 as I can't build the latest version (tests failing) even when using the chroot solution below. Is there a way to skip those tests?

<deleted-account> commented on 2023-01-17 09:19 (UTC)

From the [ArchWiki]https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot, you can use extra-x86_64-build in the same directory where the PKGBUILD is.

Note that when I tried building this package in a clean chroot, it did not help pass the tests so it may differ between systems.

Cody_Learner commented on 2023-01-16 23:42 (UTC) (edited on 2023-01-17 00:49 (UTC) by Cody_Learner)


I had no luck building this one in an nspawn container using my aur helper script.
Install the devtools package if you decide to try this.
I made no changes to anything, and built it as git cloned.

Here's how I built it:

$ mkdir ~/chroot/python2
$ CHROOT=~/chroot/python2
$ mkarchroot $CHROOT/root base-devel
$ cd ~/chroot/python2/root/home/
$ sudo git clone https://aur.archlinux.org/python2.git
$ sudo chown $USER:$USER ~/chroot/python2/root/home/python2/
$ cd ~/chroot/python2/root/home/python2/
$ makechrootpkg -c -r $CHROOT
Go have a beer. It takes some time to build.
If you see something like this when you return, you're in luck:

==> Creating package "python2"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: python2 2.7.18-8 (Mon Jan 16 15:13:02 2023)

You'll find the built package in:

~/chroot/python2/root/home/python2/

qtmax commented on 2023-01-13 20:14 (UTC)

I also have tests failing:

test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) ... Expected line File "/tmp/tmprRwRk3/script.py", line 2, in __main__.Test
Got stdout:
**********************************************************************
File "/tmp/tmprRwRk3/script.py", line 2, in __main__.Test
Failed example:
    'line 2'
Expected nothing
Got:
    'line 2'
**********************************************************************
1 items had failures:
   1 of   1 in __main__.Test
***Test Failed*** 1 failures.

Expected line File "/tmp/tmprRwRk3/test_zip.zip/__main__.py", line 2, in __main__.Test
Got stdout:
**********************************************************************
File "/tmp/tmprRwRk3/test_zip.zip/__main__.py", line 2, in __main__.Test
Failed example:
    'line 2'
Expected nothing
Got:
    'line 2'
**********************************************************************
1 items had failures:
   1 of   1 in __main__.Test
***Test Failed*** 1 failures.

...

== Tests result: FAILURE ==

367 tests OK.

3 tests failed:
    test_codecs test_locale test_time

25 tests skipped:
    test_aepack test_al test_applesingle test_bsddb test_bsddb185
    test_bsddb3 test_cd test_cl test_dl test_gl test_imageop
    test_imgfile test_kqueue test_linuxaudiodev test_macos
    test_macostools test_msilib test_ossaudiodev test_py3kwarn
    test_scriptpackages test_startfile test_sunaudiodev test_winreg
    test_winsound test_zipfile64
2 skips unexpected on linux2:
    test_bsddb test_bsddb3

Total duration: 6 min 58 sec
Tests result: FAILURE

In addition to test_time, test_codecs and test_locale also fail. The build attempt was in a clean Archlinux installation in a machinectl (systemd-nspawn) container.

maid commented on 2023-01-13 09:09 (UTC)

0:22:17 load avg: 1.23 [351/395/2] test_tuple test_addmul (test.test_tuple.TupleTest) ... ok test_bigrepeat (test.test_tuple.TupleTest) ... /usr/bin/xvfb-run: line 181: 7633 Segmentation fault (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" ==> ERROR: A failure occurred in check(). Aborting...

<deleted-account> commented on 2023-01-07 20:05 (UTC)

I agree with corslog54. If users want a simpler package, they can go with the -bin one.

That said, can you address the issue with test_time? This issue only affects python2 and since it is EOL, it won't be addressed from source.

Here is a possible fix (again): adding local -x TZ=UTC. References:https://github.com/python/cpython/issues/66265, https://bugs.gentoo.org/610628.

micwoj92 commented on 2023-01-06 03:15 (UTC)

Environments where people build packages can differ greatly and a test failing can already indicate possibility of a package (or its functionality) not working correctly.

swyter commented on 2023-01-06 01:37 (UTC)

You guys should disable the tests when building AUR packages altogether. They aren't doing anything remotely useful, they should be used for development, and add an insane amount of time and dependencies.

corslog54 commented on 2023-01-04 19:17 (UTC)

I am getting the build failure that sp1cyf0x had. Where exactly do I need to add the TZ=UTC line?