Files
haikuports/dev-python/importlib_metadata/importlib_metadata-1.6.0.recipe
2020-04-17 09:09:31 +02:00

66 lines
1.9 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="A library to access the metadata for a Python package"
DESCRIPTION="importlib_metadata is a library which provides an API for \
accessing an installed packages metadata (see PEP 566), such as its entry \
points or its top-level name. This functionality intends to replace most \
uses of pkg_resources entry point API and metadata API. Along with \
importlib.resources in Python 3.7 and newer (backported as \
importlib_resources for older versions of Python), this can eliminate \
the need to use the older and less efficient pkg_resources package."
HOMEPAGE="https://pypi.org/project/jsonschema/
https://github.com/Julian/jsonschema"
COPYRIGHT="2013 Julian Berman"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://files.pythonhosted.org/packages/b4/1b/baab42e3cd64c9d5caac25a9d6c054f8324cdc38975a44d600569f1f7158/importlib_metadata-1.6.0.tar.gz"
CHECKSUM_SHA256="34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python3)
PYTHON_VERSIONS=(3.7)
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
}