summaryrefslogtreecommitdiff
path: root/repo/python-setuptools-bootstrap
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/python-setuptools-bootstrap
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'repo/python-setuptools-bootstrap')
-rw-r--r--repo/python-setuptools-bootstrap/python-setuptools-bootstrap.xibuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/repo/python-setuptools-bootstrap/python-setuptools-bootstrap.xibuild b/repo/python-setuptools-bootstrap/python-setuptools-bootstrap.xibuild
new file mode 100644
index 0000000..987f90e
--- /dev/null
+++ b/repo/python-setuptools-bootstrap/python-setuptools-bootstrap.xibuild
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+NAME="python-setuptools-bootstrap"
+DESC="Bootstrap of python setuptools"
+
+MAKEDEPS="python"
+
+PKG_VER=65.6.3
+SOURCE="https://github.com/pypa/setuptools.git"
+BRANCH=v$PKG_VER
+
+#prepare() {
+
+ # Unbundle
+ # rm -rf pkg_resources/extern pkg_resources/_vendor \
+ # setuptools/extern setuptools/_vendor
+
+ # Upstream devendoring logic is badly broken, see:
+ # https://bugs.archlinux.org/task/58670
+ # https://github.com/pypa/pip/issues/5429
+ # https://github.com/pypa/setuptools/issues/1383
+ # The simplest fix is to simply rewrite import paths to use the canonical
+ # location in the first place
+ # for _module in setuptools pkg_resources '' ; do
+ # find . -name \*.py -exec sed -i \
+ # -e 's/from '$_module.extern' import/import/' \
+ # -e 's/from '$_module.extern'./from /' \
+ # -e 's/import '$_module.extern'./import /' \
+ # -e "s/__import__('$_module.extern./__import__('/" \
+ # {} +
+ # done
+
+ # Fix post-release tag
+ #sed -e '/tag_build = .post/d' \
+ #-e '/tag_date = 1/d' \
+ #-i setup.cfg
+#}
+
+build() {
+ python3 bootstrap.py
+ python3 setup.py build
+}
+
+package() {
+ # Otherwise it complains that build/scripts-3.10 cannot be found
+ # no other changes noted
+ mkdir -p build/scripts-3.10
+
+ python3 setup.py install --root="$PKG_DEST" --skip-build
+}
+