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.
This commit is contained in:
Jerome Duval
2017-04-16 23:10:32 +02:00
parent 5ce1bcd42d
commit 282a03c8e8
89 changed files with 2389 additions and 1913 deletions

View File

@@ -0,0 +1,88 @@
SUMMARY="A library for testing in Python"
DESCRIPTION="
Mock allows you to replace parts of your system under test with mock objects \
and make assertions about how they have been used.
Mock provides a core 'MagicMock' class removing the need to create a host of \
stubs throughout your test suite. After performing an action, you can make \
assertions about which methods / attributes were used and arguments they were \
called with. You can also specify return values and set needed attributes in \
the normal way.
The mock module also provides utility functions / objects to assist with \
testing, particularly monkey patching."
HOMEPAGE="http://pypi.python.org/pypi/mock"
COPYRIGHT="2003-2012, Michael Foord"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://pypi.python.org/packages/source/m/mock/mock-$portVersion.tar.gz"
CHECKSUM_SHA256="b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
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
BUILD()
{
rm -rf build*
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
$python setup.py build
mv build build$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
mv build$pythonVersion build
$python setup.py install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}

View File

@@ -1,57 +0,0 @@
SUMMARY="A library for testing in Python"
DESCRIPTION="
Mock allows you to replace parts of your system under test with mock objects \
and make assertions about how they have been used.
Mock provides a core 'MagicMock' class removing the need to create a host of \
stubs throughout your test suite. After performing an action, you can make \
assertions about which methods / attributes were used and arguments they were \
called with. You can also specify return values and set needed attributes in \
the normal way.
The mock module also provides utility functions / objects to assist with \
testing, particularly monkey patching."
HOMEPAGE="http://pypi.python.org/pypi/mock"
COPYRIGHT="2003-2012, Michael Foord"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://pypi.python.org/packages/source/m/mock/mock-$portVersion.tar.gz"
CHECKSUM_SHA256="1e247dbecc6ce057299eb7ee019ad68314bb93152e81d9a6110d35f4d5eca0f6"
SOURCE_DIR="mock-$portVersion"
ARCHITECTURES="any"
PROVIDES="
python_mock = $portVersion
"
REQUIRES="
haiku
cmd:python2
"
BUILD_REQUIRES="
haiku_devel
python_setuptools >= 17.1.0
"
BUILD_PREREQUIRES="
cmd:python2
"
BUILD()
{
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python2/bin/python2
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
$python setup.py install \
--single-version-externally-managed \
--root=/ --prefix=$prefix
}