Python packaging
Package: python-bootstrap-evil
Major release
Arch's Python modules store the version number in the module path meaning they won't be picked up by a new Python release for example 3.11 => 3.12.
- bump Python and rebuild it in a separate branch
- bootstrap
- find incompatible packages upfront?
Rebuild order
The python package repo has a script called genrebuild
this should include all packages required for the rebuild:
Figuring out the order:
./genrebuild > rebuild-list.txt
cat rebuild-list.txt | xargs expac -Sv %n | sort | uniq > final.txt
For some reason our files.db include old packages which are no longer in the repos, arch-rebuild-order hard fails on missing packages so we clean those out with an ugly expac hack.
We can use arch-rebuild-order, it does not handle cyclic depenendencies but should be good enough (tm):
arch-rebuild-order --no-reverse-depends $(cat ./final.txt)
Python bootstrapping
Custom repository:
https://pkgbuild.com/~jelle/python3.11
cp /usr/share/devtools/pacman-staging.conf /usr/share/devtools/pacman-python.conf
Edit the config file and add above [staging]
[python]
SigLevel = Optional
Server = https://pkgbuild.com/~jelle/python3.11
sudo ln -s /usr/bin/archbuild /usr/bin/python-x86_64-build
repo-add python.db.tar.gz *.pkg.tar.zst
sudo python-x86_64-build -- -- --nocheck
Bootstrappping
- First build
python-bootstrap
(from svn-packages) with Python 3.X - Yeet the packages into a pacman repository
- Build flit-core with bootstrapped build and installer
- Build python-installer comment out the sphinx build and repo-add it
- Build python-packaging (requires build,installer,flit-core). HACK:
PYTHONPATH=src python -m build -nw
required by python-build! - Build python-build comment out the sphinx build and repo-add it
- Build python-pyproject-hooks and repo-add it
- build python-jaraco.text (requirement for bootstrap build of setuptools)
- build python-setuptools => bootstrap python-jaraco.text and tons more...
- Or build python-setuptools with export PYTHONPATH=/usr/lib/python3.10/site-packages/
- Wheel needs jaraco.functools and shit..