mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 16:50:06 +02:00
pytest-mock: new recipe
This commit is contained in:
64
dev-python/pytest_mock/pytest_mock-3.7.0.recipe
Normal file
64
dev-python/pytest_mock/pytest_mock-3.7.0.recipe
Normal file
@@ -0,0 +1,64 @@
|
||||
SUMMARY="A thin-wrapper around the mock package for py.test"
|
||||
DESCRIPTION="This provides a thin-wrapper around the patching API provided by \
|
||||
the mock package for py.test."
|
||||
HOMEPAGE="https://pytest.org"
|
||||
COPYRIGHT="2016 Bruno Oliveira"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.io/packages/source/p/pytest-mock/pytest-mock-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"
|
||||
SOURCE_DIR="pytest-mock-$portVersion"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
pytest_mock = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python3 python38 python39)
|
||||
PYTHON_VERSIONS=(3.7 3.8 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\n\
|
||||
pytest_$pythonPackage\n\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_scm_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user