summaryrefslogtreecommitdiff
path: root/repo/python-flit
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-flit
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'repo/python-flit')
-rw-r--r--repo/python-flit/python-flit.xibuild27
-rw-r--r--repo/python-flit/tests-use-python3.patch18
2 files changed, 45 insertions, 0 deletions
diff --git a/repo/python-flit/python-flit.xibuild b/repo/python-flit/python-flit.xibuild
new file mode 100644
index 0000000..f67c571
--- /dev/null
+++ b/repo/python-flit/python-flit.xibuild
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+NAME="python-flit"
+DESC="simple packaging tool for simple packages"
+
+MAKEDEPS="python-installer python-flit-core python-tomli-w"
+DEPS="python-tomli-w"
+
+PKG_VER=3.7.1
+SOURCE="https://files.pythonhosted.org/packages/source/f/flit/flit-$PKG_VER.tar.gz"
+
+
+build() {
+ # temp hack to not pull in all of py3-build
+ mkdir dist
+ python3 - <<-EOF
+ import flit_core.buildapi as buildapi
+ name = buildapi.build_wheel('./dist')
+ print(name)
+ EOF
+}
+
+package() {
+ python3 -m installer -d "$PKG_DEST" \
+ dist/flit-$PKG_VER-py3-none-any.whl
+}
+
diff --git a/repo/python-flit/tests-use-python3.patch b/repo/python-flit/tests-use-python3.patch
new file mode 100644
index 0000000..ab4a3bb
--- /dev/null
+++ b/repo/python-flit/tests-use-python3.patch
@@ -0,0 +1,18 @@
+diff --git a/tests/test_find_python_executable.py b/tests/test_find_python_executable.py
+index 161dc7a..c6f0ebc 100644
+--- a/tests/test_find_python_executable.py
++++ b/tests/test_find_python_executable.py
+@@ -16,11 +16,11 @@ def test_self():
+
+
+ def test_abs():
+- assert find_python_executable("/usr/bin/python") == "/usr/bin/python"
++ assert find_python_executable("/usr/bin/python3") == "/usr/bin/python3"
+
+
+ def test_find_in_path():
+- assert os.path.isabs(find_python_executable("python"))
++ assert os.path.isabs(find_python_executable("python3"))
+
+
+ @pytest.mark.parametrize("bad_python_name", ["pyhton", "ls", "."])