summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Heinz Wiesinger <pprkut@slackbuilds.org>2022-03-14 11:57:27 +0100
committer Heinz Wiesinger <pprkut@slackbuilds.org>2022-03-14 12:49:43 +0100
commit138a180b52ead14111627647c7f143f166c43b1f (patch)
treed326ec503a65a7d9622688b7fe133617e483e83a
parent2dbac016f564b0fe57019b56c2b1b176b4c3ebe9 (diff)
downloadtemplates-master.tar.gz
templates-master.tar.xz
python-template.SlackBuild: Add build instructions for PEP 517/PEP 660 based projectsHEADmaster15.0
-rw-r--r--python-template.SlackBuild12
1 files 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