mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 14:50:08 +02:00
76 lines
2.1 KiB
Bash
76 lines
2.1 KiB
Bash
SUMMARY="A simple immutable dictionary for Python"
|
|
DESCRIPTION="frozendict is a simple immutable dictionary. It's fast as dict, and sometimes faster!
|
|
|
|
Unlike other similar implementations, immutability is guaranteed: you can't change the internal \
|
|
variables of the class, and they are all immutable objects. Reinvoking __init__ does not alter \
|
|
the object.
|
|
|
|
The API is the same as dict, without methods that can change the immutability. So it supports also \
|
|
fromkeys, unlike other implementations. Furthermore it can be pickled, unpickled and have an hash, \
|
|
if all values are hashable.
|
|
|
|
You can also add any dict to a frozendict using the | operator. The result is a new frozendict."
|
|
HOMEPAGE="https://github.com/Marco-Sulla/python-frozendict"
|
|
COPYRIGHT="2012-2016 Santiago Lezica"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://pypi.python.org/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="5526559eca8f1780a4ee5146896f59afc31435313560208dd394a3a5e537d3ff"
|
|
|
|
# We are not building the optional C extension (use env-var CIBUILDWHEEL=1 for that),
|
|
# so we remain "any" here.
|
|
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+="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
python=python$pythonVersion
|
|
|
|
# upstream `build.sh` does this (and we need to delete dist when using hp -G anyway):
|
|
rm -rf build dist *.egg-info
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer --p $prefix dist/*.whl
|
|
|
|
packageEntries ${PYTHON_PACKAGES[i]} \
|
|
"$prefix"/lib/python*
|
|
done
|
|
}
|