From d36c23a5bf4245e1cfb873749745e2211f6dfe84 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sat, 6 Mar 2021 01:12:19 +1300 Subject: [PATCH] pkg(python-3.9.1): switch to new build system --- packages/python-3.9.1/build.sh | 19 ++++++++++++++ packages/python-3.9.1/environment | 1 + packages/python-3.9.1/metadata.json | 7 +++++ packages/python-3.9.1/pkg-info.json | 11 ++++++++ packages/python-3.9.1/run | 3 +++ .../{python.test => python-3.9.1/test.py} | 0 packages/python.mk | 26 ------------------- 7 files changed, 41 insertions(+), 26 deletions(-) create mode 100755 packages/python-3.9.1/build.sh create mode 100644 packages/python-3.9.1/environment create mode 100644 packages/python-3.9.1/metadata.json create mode 100644 packages/python-3.9.1/pkg-info.json create mode 100644 packages/python-3.9.1/run rename packages/{python.test => python-3.9.1/test.py} (100%) delete mode 100644 packages/python.mk diff --git a/packages/python-3.9.1/build.sh b/packages/python-3.9.1/build.sh new file mode 100755 index 0000000..83e0873 --- /dev/null +++ b/packages/python-3.9.1/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +mkdir -p build/tmp build/python +cd build + +curl "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz" -o python.tar.gz +tar xzf python.tar.gz --strip-components=1 -C python + +cd python + + +./configure --prefix /piston/packages/python/3.9.1/python-3.9.1 +make -j$(nproc) +DESTDIR=build/tmp make altinstall -j$(nproc) + + +mv build/tmp/piston/packages/python/3.9.1/python-3.9.1 ../../output + + diff --git a/packages/python-3.9.1/environment b/packages/python-3.9.1/environment new file mode 100644 index 0000000..bd0ff98 --- /dev/null +++ b/packages/python-3.9.1/environment @@ -0,0 +1 @@ +export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python-3.9.1/metadata.json b/packages/python-3.9.1/metadata.json new file mode 100644 index 0000000..98c33ed --- /dev/null +++ b/packages/python-3.9.1/metadata.json @@ -0,0 +1,7 @@ +{ + "language": "python", + "version": "3.9.1", + "author": "Thomas Hobson ", + "dependencies": {}, + "aliases": ["py", "python3"] +} \ No newline at end of file diff --git a/packages/python-3.9.1/pkg-info.json b/packages/python-3.9.1/pkg-info.json new file mode 100644 index 0000000..4759093 --- /dev/null +++ b/packages/python-3.9.1/pkg-info.json @@ -0,0 +1,11 @@ +{ + "language": "python", + "version": "3.9.1", + "author": "Thomas Hobson ", + "dependencies": {}, + "aliases": [ + "py", + "python3" + ], + "build_platform": "baremetal-debian" +} diff --git a/packages/python-3.9.1/run b/packages/python-3.9.1/run new file mode 100644 index 0000000..7b3205b --- /dev/null +++ b/packages/python-3.9.1/run @@ -0,0 +1,3 @@ +#!/bin/bash + +python3.9 $* \ No newline at end of file diff --git a/packages/python.test b/packages/python-3.9.1/test.py similarity index 100% rename from packages/python.test rename to packages/python-3.9.1/test.py diff --git a/packages/python.mk b/packages/python.mk deleted file mode 100644 index d0aa0ab..0000000 --- a/packages/python.mk +++ /dev/null @@ -1,26 +0,0 @@ -NAME=python -AUTHOR=Thomas Hobson -DEPENDENCIES= -COMPILED=false -VERSIONS=3.5.1 3.9.1 - -include common.mk - - -${RUN_FILE}: - echo 'python${VERSION_MINOR} $$*' > $@ - -${ENV_FILE}: - echo 'export PATH=$$PWD/bin:$$PATH' > $@ - -${BIN_DIR}: ${BUILD_DIR}Python-${VERSION}/ - $(eval TMP_DIR=${PWD}/${BUILD_DIR}tmpout/) - - cd $< && ./configure --prefix ${PREFIX} - $(MAKE) -C $< - DESTDIR=${TMP_DIR} $(MAKE) -C $< altinstall - mv ${TMP_DIR}${PREFIX} ${BIN_DIR} && rm -rf ${TMP_DIR} - - -${BUILD_DIR}Python-${VERSION}.tar.gz: - curl "https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz" -o $@