mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
frozendict: update to version 2.3.8, cleanups, support Python 3.10. (#9448)
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
SUMMARY="An immutable dictionary for Python"
|
||||
DESCRIPTION="frozendict is an immutable wrapper around dictionaries that \
|
||||
implements the complete mapping interface. It can be used as a drop-in \
|
||||
replacement for dictionaries where immutability is desired.
|
||||
|
||||
Of course, this is python, and you can still poke around the object’s \
|
||||
internals if you want.
|
||||
|
||||
The frozendict constructor mimics dict, and all of the expected interfaces \
|
||||
(iter, len, repr, hash, getitem) are provided. Note that a frozendict does \
|
||||
not guarantee the immutability of its values, so the utility of hash method \
|
||||
is restricted by usage.
|
||||
|
||||
The only difference is that the copy() method of frozendict takes variable \
|
||||
keyword arguments, which will be present as key/value pairs in the new, \
|
||||
immutable copy."
|
||||
HOMEPAGE="https://pypi.org/project/frozendict/"
|
||||
COPYRIGHT="2012-2016 Santiago Lezica"
|
||||
LICENSE="MIT"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/4e/55/a12ded2c426a4d2bee73f88304c9c08ebbdbadb82569ebdd6a0c007cfd08/frozendict-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="774179f22db2ef8a106e9c38d4d1f8503864603db08de2e33be5b778230f6e45"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39)
|
||||
PYTHON_VERSIONS=(3.9)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$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
|
||||
}
|
||||
|
||||
75
dev-python/frozendict/frozendict-2.3.8.recipe
Normal file
75
dev-python/frozendict/frozendict-2.3.8.recipe
Normal file
@@ -0,0 +1,75 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user