pkg(python-3.9.1): switch to new build system

This commit is contained in:
Thomas Hobson 2021-03-06 01:12:19 +13:00
parent f592bbb971
commit d36c23a5bf
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
7 changed files with 41 additions and 26 deletions

19
packages/python-3.9.1/build.sh vendored Executable file
View File

@ -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

1
packages/python-3.9.1/environment vendored Normal file
View File

@ -0,0 +1 @@
export PATH=$PWD/bin:$PATH

7
packages/python-3.9.1/metadata.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"language": "python",
"version": "3.9.1",
"author": "Thomas Hobson <thomas@hexf.me>",
"dependencies": {},
"aliases": ["py", "python3"]
}

11
packages/python-3.9.1/pkg-info.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"language": "python",
"version": "3.9.1",
"author": "Thomas Hobson <thomas@hexf.me>",
"dependencies": {},
"aliases": [
"py",
"python3"
],
"build_platform": "baremetal-debian"
}

3
packages/python-3.9.1/run vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
python3.9 $*

View File

@ -1,26 +0,0 @@
NAME=python
AUTHOR=Thomas Hobson <thomas@hexf.me>
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 $@