Package Details: pypy3-setuptools 1:84.2.1-1

Git Clone URL: https://aur.archlinux.org/pypy3-setuptools.git (read-only, click to copy)
Package Base: pypy3-setuptools
Description: Easily download, build, install, upgrade, and uninstall Python packages
Upstream URL: https://setuptools.pypa.io
Licenses: MIT
Submitter: carlosal1015
Maintainer: carlosal1015
Last Packager: carlosal1015
Votes: 0
Popularity: 0.000000
First Submitted: 2024-09-20 23:56 (UTC)
Last Updated: 2026-10-24 01:02 (UTC)

Latest Comments

maksverver commented on 2026-10-11 18:32 (UTC) (edited on 2026-10-11 18:33 (UTC) by maksverver)

This fails to build when not already installed:

Traceback (most recent call last):
  File "/tmp/tmpnodlven3.py", line 1, in <module>
    from distutils.util import byte_compile
ModuleNotFoundError: No module named 'distutils'
error: command '/usr/bin/pypy3' failed with exit code 1
==> ERROR: A failure occurred in package().

The reason is the distutils.util.byte_compile function is provided by the setuptools package itself, which is not yet installed.

A workaround is to disable optimization first:

diff --git a/PKGBUILD b/PKGBUILD
index cece01c..7391da8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -32,6 +32,6 @@ _check() {
 package() {
   depends=(pypy3)
   cd "${srcdir}/${_base}-${pkgver}"
-  pypy3 setup.py install --prefix=/opt/pypy3 --root="${pkgdir}" --optimize=1
+  pypy3 setup.py install --prefix=/opt/pypy3 --root="${pkgdir}" --optimize=0
   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }

Build with makepkg, install the package, then revert the patch, makepkg again, install the new package which should now contain the optimized scripts as well.

Ideally the PKGBUILD would either automate this bootstrapping process, or just install the unoptimized versions (I don't think much optimization of bytecode matters all that much in practice).