Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorTasos Sahanidis <tasos@tasossah.com>2024-03-08 03:48:48 +0200
committerTasos Sahanidis <tasos@tasossah.com>2024-03-08 03:48:48 +0200
commitec6aa86ddf4f2e75eaf5fa2a2b9d787f2b2db1f3 (patch)
tree31f94411b97d65bc96ad6acb57a8d9c5499189c9 /extra
parent1a073c80ed3d29344f0028c4858cbe4db8d2c7ce (diff)
extra/python-setuptools: Fix invalid command egg_info
Diffstat (limited to 'extra')
-rw-r--r--extra/python-setuptools/PKGBUILD41
1 files changed, 32 insertions, 9 deletions
diff --git a/extra/python-setuptools/PKGBUILD b/extra/python-setuptools/PKGBUILD
index 6318b613..d0a95c81 100644
--- a/extra/python-setuptools/PKGBUILD
+++ b/extra/python-setuptools/PKGBUILD
@@ -1,16 +1,39 @@
-# create directory before installing (otherwise installing fails)
+# WARNING! If you get an error along the lines of
+# "error: cannot copy tree 'build/scripts-3.11': not a directory", STOP!
+#
+# You might be tempted, but do *NOT* `mkdir build/scripts-3.XX`.
+#
+# This happens because upstream is using the git repo which doesn't have the metadata.
+# It doesn't affect upstream because their setuptools already has a directory .egg-info,
+# whereas if we have an .egg-info file, then it will result in "error: invalid command 'egg_info'"
+# when trying to build any python package that uses setuptools.
+#
+# That said, let's build from the source tarball which already has the metadata.
+
+# Add the tarball
+source[0]="https://pypi.python.org/packages/source/s/setuptools/setuptools-$pkgver.tar.gz"
+# Depending on how annoying this gets, maybe comment it to switch back to SKIP
+sha512sums[0]='11df934931f4b73f7e07ea5713479593c6baa134d423556b2ae7aff0f1e5bdbdee1f5b516131adb169c838231ceb0293441fbf275ef7030dabecf74122565b6d'
+
+# Work around the directory name containing the version
+eval "$(
+ declare -f prepare | \
+ sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/'
+)"
+eval "$(
+ declare -f build | \
+ sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/'
+)"
eval "$(
declare -f package | \
- sed '
- 4 i mkdir build/scripts-3.11
- '
+ sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/'
)"
-# ignore errors in tests, but execute the tests
+# Skip the last two patches
eval "$(
- declare -f check | \
- sed '
- s/\(python.*\)/\1 || true/
- '
+ declare -f prepare | \
+ sed '/add-dependency.patch/d' | sed '/build-no-isolation.patch/d'
)"
+# Don't bother with the tests
+unset check