From 138a180b52ead14111627647c7f143f166c43b1f Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Mon, 14 Mar 2022 11:57:27 +0100 Subject: python-template.SlackBuild: Add build instructions for PEP 517/PEP 660 based projects --- python-template.SlackBuild | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/python-template.SlackBuild b/python-template.SlackBuild index ecf7492..898e1ca 100644 --- a/python-template.SlackBuild +++ b/python-template.SlackBuild @@ -109,12 +109,20 @@ find -L . \ # Your application may need different options; this is only an example -# For python2 +## If your application uses setup.py: + +### For python2 python2 setup.py install --root=$PKG -# For python3 +### For python3 python3 setup.py install --root=$PKG +## If your application only has a pyproject.toml: + +python3 -m build --wheel --no-isolation + +python3 -m installer --destdir "$PKG" dist/*.whl + # Strip binaries and libraries. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -- cgit v1.2.3