Files
haikuports/dev-python/zope-interface/zope_interface-4.3.3.recipe
Jerome Duval 282a03c8e8 dev-python: merge most python2 and python3 recipes.
* adjust recipes depending on these, ie python_dateutil=>dateutil_python.
* switch architectures to any for relevant python recipes.
* bump versions for retext, argh, beautifulsoup, cssselect, dateutil,
docutils, fonttools, html2text, httplib2, lxml, mechanize, mock, paramiko,
pillow, pip, pygments, requests, twisted, urllib3, zope_interface.
2017-04-17 10:08:41 +02:00

74 lines
2.0 KiB
Bash

SUMMARY="Interfaces for Python"
DESCRIPTION="
This package provides an implementation of 'object interfaces' for Python. \
Interfaces are a mechanism for labeling objects as conforming to a given \
API or contract. So, this package can be considered as implementation of the \
Design By Contract methodology support in Python.
For detailed documentation, please see http://docs.zope.org/zope.interface"
HOMEPAGE="http://pypi.python.org/pypi/zope.interface"
COPYRIGHT="2004-2014 Zope Foundation and Contributors"
LICENSE="ZPL 2.1"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/z/zope.interface/zope.interface-$portVersion.tar.gz"
CHECKSUM_SHA256="8780ef68ca8c3fe1abb30c058a59015129d6e04a6b02c2e56b9c7de6078dfa88"
SOURCE_DIR="zope.interface-$portVersion"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:gcc
"
PYTHON_PACKAGES=(python python3)
PYTHON_VERSIONS=(2.7 3.6)
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
REPLACES_python="
python_zope.interface
"
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
# GENERIC: all python_setuptools-based installs need this
python=python$pythonVersion
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/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
}