mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
pycryptodome: new recipe (#7714)
* pycryptodome: new recipe * Add the "separate_namespace" version: pycryptodomex. This one installs as "Cryptodome", as to not conflict with pycrypto. Minor clean ups on both recipes. Build, installed, and smoke-tested on both x86_64 and x86_32 (GCC11).
This commit is contained in:
92
dev-python/pycryptodome/pycryptodome-3.16.0.recipe
Normal file
92
dev-python/pycryptodome/pycryptodome-3.16.0.recipe
Normal file
@@ -0,0 +1,92 @@
|
||||
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).
|
||||
"
|
||||
HOMEPAGE="https://www.pycryptodome.org/"
|
||||
COPYRIGHT="2014-2022 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="0e45d2d852a66ecfb904f090c3f87dc0dfb89a499570abad8590f10d9cffb350"
|
||||
SOURCE_FILENAME="pycryptodome-$portVersion.tar.gz"
|
||||
SOURCE_DIR="pycryptodome-$portVersion"
|
||||
PATCHES="pycryptodome-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_64 !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
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$secondaryArchSuffix\n\
|
||||
lib:libgmp$secondaryArchSuffix\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
eval "CONFLICTS_$pythonPackage='
|
||||
pycrypto_$pythonPackage
|
||||
'"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
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
|
||||
|
||||
$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