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,78 @@
SUMMARY="A Pythonic binding for the libxml2 and libxslt libraries"
DESCRIPTION=" The lxml XML toolkit is unique in that it combines the speed \
and XML feature completeness of the libxml2 and libxslt libraries with the \
simplicity of a native Python API, mostly compatible but superior to the \
well-known ElementTree API.
The latest release works with all CPython versions from 2.4 to 3.3."
HOMEPAGE="http://lxml.de/
http://pypi.python.org/pypi/lxml/"
COPYRIGHT="2003-2010 Gustavo Niemeyer"
#FIXME: check exact license
#gentoo says: LICENSE="BSD ElementTree GPL-2 PSF-2"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://lxml.de/files/lxml-$portVersion.tgz"
CHECKSUM_SHA256="59d9176360dbc3919e9d4bfca85c1ca64ab4f4ee00e6f119d7150ba887e3410a"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
devel:libxml2
devel:libxslt
devel:libz
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:ld
"
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\
lib:libxml2\n\
lib:libxslt\n\
lib:libz\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
REPLACES_python="
python_lxml
"
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
}

View File

@@ -0,0 +1,31 @@
From 72985b29a3f51785c7fb070080861c815e6d3edd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Tue, 29 Jul 2014 01:50:29 +0200
Subject: [PATCH] Fix Haiku build (no libm)
GRMBL !$*^= hardcoding
---
setupinfo.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/setupinfo.py b/setupinfo.py
index 4a1d150..4a5746d 100644
--- a/setupinfo.py
+++ b/setupinfo.py
@@ -186,9 +186,11 @@ def libraries():
libs = ['%s_a' % lib for lib in libs]
libs.extend(['zlib', 'WS2_32'])
elif OPTION_STATIC:
- libs = ['z', 'm']
+ libs = ['z']
else:
- libs = ['xslt', 'exslt', 'xml2', 'z', 'm']
+ libs = ['xslt', 'exslt', 'xml2', 'z']
+ if sys.platform[0:5] not in ('haiku','win32'):
+ libs.append('m')
return libs
def library_dirs(static_library_dirs):
--
1.8.3.4

View File

@@ -1,62 +0,0 @@
SUMMARY="A Pythonic binding for the libxml2 and libxslt libraries"
DESCRIPTION=" The lxml XML toolkit is unique in that it combines the speed \
and XML feature completeness of the libxml2 and libxslt libraries with the \
simplicity of a native Python API, mostly compatible but superior to the \
well-known ElementTree API.
The latest release works with all CPython versions from 2.4 to 3.3."
HOMEPAGE="http://lxml.de/
http://pypi.python.org/pypi/lxml/"
COPYRIGHT="2003-2010 Gustavo Niemeyer"
#FIXME: check exact license
#gentoo says: LICENSE="BSD ElementTree GPL-2 PSF-2"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://lxml.de/files/lxml-$portVersion.tgz"
CHECKSUM_SHA256="9c74ca28a7f0c30dca8872281b3c47705e21217c8bc63912d95c9e2a7cac6bdf"
SOURCE_DIR="lxml-$portVersion"
PATCHES="python_lxml-$portVersion.patchset"
ARCHITECTURES="x86 x86_gcc2 x86_64"
PROVIDES="
python_lxml = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libxslt$secondaryArchSuffix
lib:libz$secondaryArchSuffix
cmd:python2
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libxml2$secondaryArchSuffix
devel:libxslt$secondaryArchSuffix
devel:libz$secondaryArchSuffix
python_setuptools
"
BUILD_PREREQUIRES="
cmd:python2
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
"
BUILD()
{
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
export PATH="$portPackageLinksDir/cmd~python2/bin:$PATH"
pythonVersion=$(python2 --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
python2 setup.py install \
--single-version-externally-managed \
--root=/ --prefix=$prefix
}