diff --git a/dev-python/puremagic/puremagic-1.27.recipe b/dev-python/puremagic/puremagic-1.27.recipe new file mode 100644 index 000000000..7fd00eed3 --- /dev/null +++ b/dev-python/puremagic/puremagic-1.27.recipe @@ -0,0 +1,62 @@ +SUMMARY="Pure python implementation of identifying files based off their magic numbers" +DESCRIPTION="puremagic is a pure python module that will identify a file based off it's magic \ +numbers." +HOMEPAGE="https://github.com/cdgriffith/puremagic" +COPYRIGHT="2013-2024 Chris Griffith" +LICENSE="MIT" +REVISION="1" +pypiVersion="b1/5c/c277e7638815795a8fd6487e70eeeb30698e5033f4d562619e1571c660d2" +SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/puremagic-$portVersion-py3-none-any.whl#noarchive" +CHECKSUM_SHA256="b5519ad89e9b7c96a5fd9947d9a907e44f97cc30eae6dcf746d90a58e3681936" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_VERSIONS=(3.10) +for i in "${!PYTHON_VERSIONS[@]}"; do + pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} + eval "PROVIDES_$pythonPackage=\" + ${portName}_$pythonPackage = $portVersion + \" + REQUIRES_$pythonPackage=\" + haiku + cmd:python$pythonVersion + \"" + + BUILD_REQUIRES+=" + installer_$pythonPackage + setuptools_$pythonPackage + " + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " +done + +INSTALL() +{ + for i in "${!PYTHON_VERSIONS[@]}"; do + pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} + + python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + rm -rf build + $python -m installer -p $prefix puremagic-$portVersion-py3-none-any.whl + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}