Files
haikuports/dev-python/smmap/smmap-5.0.1.recipe
Oscar Lesta d6831586bd smmap: drop Python 3.9 support.
Only on-tree user (gitdb) already targets 3.10 only.
2025-09-19 22:53:14 -03:00

79 lines
1.8 KiB
Bash

SUMMARY="Pure git implementation of a sliding window memory map manager"
DESCRIPTION="When reading from many possibly large files in a fashion similar \
to random access, it is usually the fastest and most efficient to use memory \
maps.
Although memory maps have many advantages, they represent a very limited \
system resource as every map uses one file descriptor, whose amount is \
limited per process. On 32 bit systems, the amount of memory you can have \
mapped at a time is naturally limited to theoretical 4GB of memory, which may \
not be enough for some applications."
HOMEPAGE="https://pypi.org/project/smmap/"
COPYRIGHT="2011-2015 Sebastian Thiel and contributors"
LICENSE="BSD (3-clause)"
REVISION="3"
SOURCE_URI="https://pypi.io/packages/source/s/smmap/smmap-$portVersion.tar.gz"
CHECKSUM_SHA256="dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
TEST_REQUIRES="
cmd:pytest
"
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
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
}
TEST()
{
pytest -v
}