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,59 @@
From b2c93cc12cec881066556a0b3245acf4273f5f34 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Fri, 20 Jun 2014 04:57:11 +0000
Subject: sendmsg.c: fix compiling with gcc2.
diff --git a/src/twisted/python/_sendmsg.c b/src/twisted/python/_sendmsg.c
index e84c08b..e9b8677 100644
--- a/src/twisted/python/_sendmsg.c
+++ b/src/twisted/python/_sendmsg.c
@@ -175,9 +175,11 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
int fd;
int flags = 0;
+ size_t all_data_len = 0;
Py_ssize_t sendmsg_result, iovec_length;
struct msghdr message_header;
- struct iovec iov[1];
+ struct iovec iov[1];
+ struct cmsghdr *control_message = NULL;
PyObject *ancillary = NULL;
PyObject *iterator = NULL;
PyObject *item = NULL;
@@ -223,7 +225,7 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
goto finished;
}
- size_t all_data_len = 0;
+ all_data_len = 0;
/* First we need to know how big the buffer needs to be in order to
have enough space for all of the messages. */
@@ -298,7 +300,7 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
}
/* Unpack the tuples into the control message. */
- struct cmsghdr *control_message = CMSG_FIRSTHDR(&message_header);
+ control_message = CMSG_FIRSTHDR(&message_header);
while ( (item = PyIter_Next(iterator)) && control_message!=NULL ) {
int type, level;
Py_ssize_t data_len;
@@ -505,12 +507,13 @@ static PyObject *sendmsg_recvmsg(PyObject *self, PyObject *args, PyObject *keywd
static PyObject *sendmsg_getsockfam(PyObject *self, PyObject *args,
PyObject *keywds) {
int fd;
+ socklen_t sz;
struct sockaddr sa;
static char *kwlist[] = {"fd", NULL};
if (!PyArg_ParseTupleAndKeywords(args, keywds, "i", kwlist, &fd)) {
return NULL;
}
- socklen_t sz = sizeof(sa);
+ sz = sizeof(sa);
if (getsockname(fd, &sa, &sz)) {
PyErr_SetFromErrno(sendmsg_socket_error);
return NULL;
--
2.11.0

View File

@@ -24,14 +24,45 @@ COPYRIGHT="2001-2013 Twisted project members"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/twisted/twisted/archive/twisted-$portVersion.tar.gz"
CHECKSUM_SHA256="458a917dfd61c1d480b3efa024c702890c201667c4f28ce0d5b0f1d22e4c7403"
PATCHES="python_twisted-$portVersion.patchset"
CHECKSUM_SHA256="7fcf6aa05e9dc91a2ce78ac079652001fe704a74149c2fbbb7649133c2b2bb1a"
PATCHES="twisted-$portVersion.patchset"
SOURCE_DIR="twisted-twisted-$portVersion"
ARCHITECTURES="x86 x86_gcc2 x86_64"
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
PROVIDES="
python_twisted = $portVersion
$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\n\
zope_interface_$pythonPackage\n\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
PROVIDES_python="$PROVIDES_python
cmd:cftp
cmd:ckeygen
cmd:conch
@@ -42,39 +73,48 @@ PROVIDES="
cmd:tap2rpm
cmd:tkconch
cmd:trial
cmd:twist
cmd:twistd
"
REQUIRES="
haiku
python_zope.interface >= 3.6.0
cmd:python2
REPLACES_python="
python_twisted
"
BUILD_REQUIRES="
haiku_devel
python_setuptools
python_zope.interface >= 3.6.0
PROVIDES_python3="$PROVIDES_python3
cmd:cftp3
cmd:ckeygen3
cmd:conch3
cmd:mailmail3
cmd:manhole3
cmd:pyhtmlizer3
cmd:tap2deb3
cmd:tap2rpm3
cmd:tkconch3
cmd:trial3
cmd:twist3
cmd:twistd3
"
BUILD_PREREQUIRES="
cmd:python2
cmd:gcc
"
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
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
$python setup.py install \
--single-version-externally-managed \
--root=/ --prefix=$prefix
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
if [ $pythonPackage != python ]; then
for f in $binDir/*; do
mv $f ${f}3
done
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
done
}