commit 08e0107fcca36f7bc47fadaaa624e7cae8a991f6 Author: EnumDev Date: Wed Dec 31 09:47:40 2025 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e58e5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm \ No newline at end of file diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..91eb203 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Pypi module +MODULE="greenlet" + +# Get version using Pypi Rest API +VERSION=$(curl -s -L https://pypi.org/pypi/"$MODULE"/json | jq -r '.info.version') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..fc32c69 --- /dev/null +++ b/pkg.info @@ -0,0 +1,20 @@ +name: python-greenlet +description: Lightweight in-process concurrent programming +version: 3.3.0 +revision: 1 +url: https://pypi.org/project/greenlet/ +license: MIT +architecture: any +type: source +depends: + - python3 +make_depends: + - python-build + - python-installer + - python-setuptools + - python-wheel +downloads: + - url: https://files.pythonhosted.org/packages/source/g/greenlet/greenlet-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: a82bb225a4e9e4d653dd2fb7b8b2d36e4fb25bc0165422a11e48b88e9e6f78fb diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..8b6b8f9 --- /dev/null +++ b/source.sh @@ -0,0 +1,25 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + # https://github.com/python-greenlet/greenlet/issues/454 + export CFLAGS="$CFLAGS -fcf-protection=none" + export CXXFLAGS="$CXXFLAGS -fcf-protection=none" + + python3 -m build --wheel --no-isolation . +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + python3 -m installer --destdir="$BPM_OUTPUT" dist/*.whl + + # Remove tests + rm -rf "$BPM_OUTPUT"/usr/lib/python*/site-packages/greenlet/tests + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE.PSF "$BPM_OUTPUT"/usr/share/licenses/python-greenlet/LICENSE.PSF +}