diff --git a/dev-python/editables/editables-0.3.recipe b/dev-python/editables/editables-0.3.recipe new file mode 100644 index 000000000..8ad352f9f --- /dev/null +++ b/dev-python/editables/editables-0.3.recipe @@ -0,0 +1,64 @@ +SUMMARY="A Python library for creating 'editable wheels'" +DESCRIPTION="This library supports the building of wheels which, when installed, will expose \ +packages in a local directory on 'sys.path' in 'editable mode'. In other words, changes to the \ +package source will be reflected in the package visible to Python, without needing a reinstall." +HOMEPAGE="https://github.com/pfmoore/editables" +COPYRIGHT="2020 Paul Moore" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz" +CHECKSUM_SHA256="42f7240164af1e028ccb7b60e72f54bbd8b639e9409595fbeffac5d3fb610643" +SOURCE_FILENAME="editables-$portVersion.tar.gz" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python39 python310) +PYTHON_VERSIONS=(3.9 3.10) +for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + eval "PROVIDES_$pythonPackage=\" + ${portName}_$pythonPackage = $portVersion + \"" + eval "REQUIRES_$pythonPackage=\" + haiku + cmd:python$pythonVersion + \"" + BUILD_REQUIRES+=" + setuptools_$pythonPackage + " + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " +done + +INSTALL() +{ + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + rm -rf build + $python setup.py build install \ + --root=/ --prefix=$prefix + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}