mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
pycryptodome/pycryptodomex: update to 3.17 (#7961)
- Dropped patchset, fix was made upstream. - Also build for Python 3.10. - Mention package differences in their descriptions.
This commit is contained in:
96
dev-python/pycryptodome/pycryptodomex-3.17.recipe
Normal file
96
dev-python/pycryptodome/pycryptodomex-3.17.recipe
Normal file
@@ -0,0 +1,96 @@
|
||||
SUMMARY="Cryptographic library for Python"
|
||||
DESCRIPTION="PyCryptodome is a self-contained Python package of low-level cryptographic \
|
||||
primitives.
|
||||
|
||||
PyCryptodome is a fork of PyCrypto. It brings several enhancements with respect \
|
||||
to the last official version of PyCrypto (2.6.1).
|
||||
|
||||
This package ('pycryptodomex', mind the final "x") can co-exist with the 'pycrypto' \
|
||||
packages, as it installs as a Python module under the name 'Cryptodome'."
|
||||
HOMEPAGE="https://www.pycryptodome.org/"
|
||||
COPYRIGHT="2014-2023 Legrandin"
|
||||
LICENSE="BSD (2-clause)
|
||||
Public Domain
|
||||
Unlicense
|
||||
"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/p/pycryptodome/pycryptodome-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="bce2e2d8e82fcf972005652371a3e8731956a0c1fbb719cc897943b3695ad91b"
|
||||
SOURCE_FILENAME="pycryptodome-$portVersion.tar.gz"
|
||||
SOURCE_DIR="pycryptodome-$portVersion"
|
||||
|
||||
ARCHITECTURES="x86_64 !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
"
|
||||
|
||||
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\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku$secondaryArchSuffix\n\
|
||||
lib:libgmp$secondaryArchSuffix\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cc$secondaryArchSuffix
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:make
|
||||
"
|
||||
|
||||
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
|
||||
|
||||
# This causes it to build as pycryptodomex (Cryptodome):
|
||||
touch ".separate_namespace"
|
||||
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
# You don't get the docs with `pip install` either, skip docs for now.
|
||||
# install -m 755 -d "$docDir"
|
||||
# install -m 644 -t "$docDir" README.rst
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
TEST()
|
||||
{
|
||||
python3 setup.py test
|
||||
|
||||
export PYTHON=/system/bin/python3
|
||||
cd src/test
|
||||
make
|
||||
}
|
||||
Reference in New Issue
Block a user