pycares-3.0.0.recipe revision caaee2c2
1SUMMARY="Python interface for c-ares"
2DESCRIPTION="pycares is a Python module which provides an interface to c-ares. \
3c-ares is a C library that performs DNS requests and name resolutions \
4asynchronously."
5HOMEPAGE="https://pypi.python.org/pypi/pycares"
6COPYRIGHT="2017 Sa��l Ibarra Corretg��"
7LICENSE="MIT"
8REVISION="1"
9SOURCE_URI="https://pypi.io/packages/source/p/pycares/pycares-$portVersion.tar.gz"
10CHECKSUM_SHA256="b253f5dcaa0ac7076b79388a3ac80dd8f3bd979108f813baade40d3a9b8bf0bd"
11PATCHES="pycares-$portVersion.patchset"
12
13ARCHITECTURES="x86_64"
14SECONDARY_ARCHITECTURES="x86"
15
16PROVIDES="
17	$portName = $portVersion
18	"
19REQUIRES="
20	haiku$secondaryArchSuffix
21	lib:libcares$secondaryArchSuffix
22	"
23
24BUILD_REQUIRES="
25	haiku${secondaryArchSuffix}_devel
26	devel:libcares$secondaryArchSuffix
27	"
28
29BUILD_PREREQUIRES="
30	cmd:gcc$secondaryArchSuffix
31	"
32
33PYTHON_PACKAGES=(python3)
34PYTHON_VERSIONS=(3.7)
35for i in "${!PYTHON_PACKAGES[@]}"; do
36pythonPackage=${PYTHON_PACKAGES[i]}
37pythonVersion=${PYTHON_VERSIONS[$i]}
38eval "PROVIDES_${pythonPackage}=\"\
39	${portName}_$pythonPackage = $portVersion\
40	\"; \
41REQUIRES_$pythonPackage=\"\
42	haiku\n\
43	cmd:python$pythonVersion\
44	\""
45BUILD_REQUIRES="$BUILD_REQUIRES
46	cffi_$pythonPackage
47	setuptools_$pythonPackage
48	"
49BUILD_PREREQUIRES="$BUILD_PREREQUIRES
50	cmd:python$pythonVersion"
51done
52
53INSTALL()
54{
55	for i in "${!PYTHON_PACKAGES[@]}"; do
56		pythonPackage=${PYTHON_PACKAGES[i]}
57		pythonVersion=${PYTHON_VERSIONS[$i]}
58
59		python=python$pythonVersion
60		installLocation=$prefix/lib/$python/vendor-packages/
61		export PYTHONPATH=$installLocation:$PYTHONPATH
62		mkdir -p $installLocation
63		rm -rf build
64		$python setup.py build install \
65			--root=/ --prefix=$prefix
66
67		packageEntries  $pythonPackage \
68			$prefix/lib/python*
69	done
70}
71
72
73