python: update support packages to python3

Updating the python support packages to python3. Some packages are
dropped in favour of variants that are in meta-python, some are
updated and update to the new python3 name for others.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2020-01-22 15:32:03 +00:00
parent cceef93ba8
commit 52e67d4e63
15 changed files with 39 additions and 421 deletions

View File

@ -1,25 +0,0 @@
HOMEPAGE = "https://github.com/boto/boto"
SUMMARY = "Amazon Web Services API"
DESCRIPTION = "\
Boto is a Python package that provides interfaces to Amazon Web Services. \
Currently, all features work with Python 2.6 and 2.7. Work is under way to \
support Python 3.3+ in the same codebase. Modules are being ported one at \
a time with the help of the open source community, so please check below \
for compatibility with Python 3.3+. \
"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://setup.py;md5=182ef81236d3fac2c6ed8e8d3c988ec8"
PR = "r0"
SRCNAME = "boto"
SRC_URI = "https://pypi.python.org/packages/source/b/boto/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "5556223d2d0cc4d06dd4829e671dcecd"
SRC_URI[sha256sum] = "33baab022ecb803414ad0d6cf4041d010cfc2755ff8acc3bea7b32e77ba98be0"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools

View File

@ -1,20 +0,0 @@
DESCRIPTION = "A microframework based on Werkzeug, Jinja2 and good intentions"
HOMEPAGE = "https://pypi.python.org/pypi/Flask/"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=79aa8b7bc4f781210d6b5c06d6424cb0"
PR = "r0"
SRCNAME = "Flask"
SRC_URI = "https://pypi.python.org/packages/source/F/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "378670fe456957eb3c27ddaef60b2b24"
SRC_URI[sha256sum] = "4c83829ff83d408b5e1d4995472265411d2c414112298f2eb4b359d9e4563373"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
CLEANBROKEN = "1"

View File

@ -1,29 +0,0 @@
From c2dc97478fcc3757e09d5d2997391960a8351d53 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Sun, 29 Mar 2015 22:34:28 -0400
Subject: [PATCH] gevent: allow ssl v2 or v3 certificates
Work around an issue with python 2.7 not always having SSLv3 available
by allowing v2 or v3 certificates.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
gevent/ssl.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gevent/ssl.py b/gevent/ssl.py
index ce6434718d1b..93c0d642da5f 100644
--- a/gevent/ssl.py
+++ b/gevent/ssl.py
@@ -383,7 +383,7 @@ def wrap_socket(sock, keyfile=None, certfile=None,
ciphers=ciphers)
-def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
"""Retrieve the certificate from the server at the specified address,
and return it as a PEM-encoded string.
If 'ca_certs' is specified, validate the server cert against it.
--
1.9.1

View File

@ -1,19 +0,0 @@
Due to differences in library locations, the cross compile test can fail because it can't run
the conftest binary (dynamically linked). Building it statically instead.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
libev/configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/libev/configure
+++ b/libev/configure
@@ -2730,7 +2730,7 @@
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_link='$CC -static -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.

View File

@ -1,30 +0,0 @@
HOMEPAGE = "http://www.gevent.org"
SUMMARY = "A coroutine-based Python networking library"
DESCRIPTION = "\
gevent is a coroutine-based Python networking library that uses greenlet \
to provide a high-level synchronous API on top of the libevent event \
loop. \
"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2dbb33d00e1fd31c7041460a81ac0bd2"
DEPENDS += "python-greenlet libevent"
RDEPENDS_${PN} += "python-greenlet python-mime python-pprint python-re"
SRC_URI[md5sum] = "7b952591d1a0174d6eb6ac47bd975ab6"
SRC_URI[sha256sum] = "4627e215d058f71d95e6b26d9e7be4c263788a4756bd2858a93775f6c072df43"
inherit setuptools pypi
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://libev-conf.patch"
SRC_URI += "file://gevent-allow-ssl-v2-or-v3-certificates.patch"
# The python-gevent has no autoreconf ability
# and the logic for detecting a cross compile is flawed
# so always force a cross compile
do_configure_append() {
sed -i -e 's/^cross_compiling=no/cross_compiling=yes/' ${S}/libev/configure
}
DEFAULT_PREFERENCE = "-1"

View File

@ -1,158 +0,0 @@
From 8430e7202407fb1a0a104b0decdcc9da9e41a52b Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Mon, 4 Apr 2016 23:28:15 -0400
Subject: [PATCH] Fix build with SWIG 3.0.5
See analysis and previous patches in
https://github.com/martinpaljak/M2Crypto/issues/60 and
https://github.com/swig/swig/issues/344, in particular this adds the
build machinery to patch
https://github.com/martinpaljak/M2Crypto/issues/60#issuecomment-75735489
Fixes #47
Author: Miloslav Trmac <mitr@redhat.com>
Upstream-Status: Backport
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
M2Crypto/__init__.py | 4 ++--
M2Crypto/m2.py | 2 +-
SWIG/_lib.i | 4 ++++
SWIG/_pkcs7.i | 1 +
setup.py | 24 ++++++++++++++++++++++++
5 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/M2Crypto/__init__.py b/M2Crypto/__init__.py
index 647e057..280af94 100644
--- a/M2Crypto/__init__.py
+++ b/M2Crypto/__init__.py
@@ -19,7 +19,7 @@ Copyright 2008-2011 Heikki Toivonen. All rights reserved.
version_info = (0, 22)
version = '.'.join([str(_v) for _v in version_info])
-import __m2crypto
+import _m2crypto
import m2
import ASN1
import AuthCookie
@@ -47,4 +47,4 @@ import m2xmlrpclib
import threading
import util
-__m2crypto.lib_init()
+_m2crypto.lib_init()
diff --git a/M2Crypto/m2.py b/M2Crypto/m2.py
index e4bb695..822143f 100644
--- a/M2Crypto/m2.py
+++ b/M2Crypto/m2.py
@@ -25,7 +25,7 @@ Portions created by Open Source Applications Foundation (OSAF) are
Copyright (C) 2004 OSAF. All Rights Reserved.
"""
-from __m2crypto import *
+from _m2crypto import *
lib_init()
diff --git a/SWIG/_lib.i b/SWIG/_lib.i
index 0d40698..6cc1a44 100644
--- a/SWIG/_lib.i
+++ b/SWIG/_lib.i
@@ -66,6 +66,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) {
int cret;
int new_style_callback = 0, warning_raised_exception=0;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
ssl = (SSL *)X509_STORE_CTX_get_app_data(ctx);
@@ -151,6 +152,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) {
void ssl_info_callback(const SSL *s, int where, int ret) {
PyObject *argv, *retval, *_SSL;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
gilstate = PyGILState_Ensure();
@@ -170,6 +172,7 @@ DH *ssl_set_tmp_dh_callback(SSL *ssl, int is_export, int keylength) {
PyObject *argv, *ret, *_ssl;
DH *dh;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
gilstate = PyGILState_Ensure();
@@ -193,6 +196,7 @@ RSA *ssl_set_tmp_rsa_callback(SSL *ssl, int is_export, int keylength) {
PyObject *argv, *ret, *_ssl;
RSA *rsa;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
gilstate = PyGILState_Ensure();
diff --git a/SWIG/_pkcs7.i b/SWIG/_pkcs7.i
index 22d791a..20dfbaf 100644
--- a/SWIG/_pkcs7.i
+++ b/SWIG/_pkcs7.i
@@ -157,6 +157,7 @@ PyObject *smime_read_pkcs7(BIO *bio) {
BIO *bcont = NULL;
PKCS7 *p7;
PyObject *tuple, *_p7, *_BIO;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
if (BIO_method_type(bio) == BIO_TYPE_MEM) {
/* OpenSSL FAQ explains that this is needed for mem BIO to return EOF,
diff --git a/setup.py b/setup.py
index bac6f9f..f59dc18 100644
--- a/setup.py
+++ b/setup.py
@@ -19,6 +19,7 @@ from setuptools.command import build_ext
from distutils.core import Extension
from distutils.spawn import find_executable
+from distutils.file_util import copy_file
class _M2CryptoBuildExt(build_ext.build_ext):
@@ -77,6 +78,15 @@ class _M2CryptoBuildExt(build_ext.build_ext):
[opensslIncludeDir, os.path.join(opensslIncludeDir, "openssl")]]
self.swig_opts.append('-includeall')
self.swig_opts.append('-modern')
+ self.swig_opts.append('-builtin')
+
+ # These two lines are a workaround for
+ # http://bugs.python.org/issue2624 , hard-coding that we are only
+ # building a single extension with a known path; a proper patch to
+ # distutils would be in the run phase, when extension name and path are
+ # known.
+ self.swig_opts.append('-outdir')
+ self.swig_opts.append(os.path.join(self.build_lib, 'M2Crypto'))
# Fedora does hat tricks.
if platform.linux_distribution()[0] in ['Fedora', 'CentOS']:
@@ -98,6 +108,20 @@ class _M2CryptoBuildExt(build_ext.build_ext):
self.library_dirs += [os.path.join(self.openssl, opensslLibraryDir)]
+ def run(self):
+ '''Overloaded build_ext implementation to allow inplace=1 to work,
+ which is needed for (python setup.py test).'''
+ # This is another workaround for http://bugs.python.org/issue2624 + the
+ # corresponding lack of support in setuptools' test command. Note that
+ # just using self.inplace in finalize_options() above does not work
+ # because swig is not rerun if the __m2crypto.so extension exists.
+ # Again, hard-coding our extension name and location.
+ build_ext.build_ext.run(self)
+ if self.inplace:
+ copy_file(os.path.join(self.build_lib, 'M2Crypto', '_m2crypto.py'),
+ os.path.join('M2Crypto', '_m2crypto.py'),
+ verbose=self.verbose, dry_run=self.dry_run)
+
if sys.platform == 'darwin':
my_extra_compile_args = ["-Wno-deprecated-declarations"]
else:
--
1.9.1

View File

@ -1,63 +0,0 @@
HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
SUMMARY = "A Python crypto and SSL toolkit"
DESCRIPTION = "\
M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, \
DSA, DH, EC, HMACs, message digests, symmetric ciphers (including \
AES); SSL functionality to implement clients and servers; HTTPS \
extensions to Python's httplib, urllib, and xmlrpclib; unforgeable \
HMAC'ing AuthCookies for web session management; FTP/TLS client and \
server; S/MIME; ZServerSSL: A HTTPS server for Zope and ZSmime: An \
S/MIME messenger for Zope. M2Crypto can also be used to provide SSL \
for Twisted. \
"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=0ccca7097c1d29fa42e75e9c15c6ff2e"
PYPI_PACKAGE = "M2Crypto"
SRC_URI += " \
file://m2crypto-Fix-build-with-SWIG-3.0.5.patch \
"
SRC_URI[md5sum] = "573f21aaac7d5c9549798e72ffcefedd"
SRC_URI[sha256sum] = "6071bfc817d94723e9b458a010d565365104f84aa73f7fe11919871f7562ff72"
DEFAULT_PREFERENCE = "-1"
inherit setuptools pypi
DEPENDS += "openssl swig-native"
DISTUTILS_BUILD_ARGS += "build_ext -I${STAGING_INCDIR}"
inherit setuptools pypi
SWIG_FEATURES_x86-64 = "-D__x86_64__"
SWIG_FEATURES ?= ""
export SWIG_FEATURES
# Get around a problem with swig, but only if the
# multilib header file exists.
#
do_compile_prepend() {
sed -i -e 's/self.add_multiarch_paths.*$/# &/;' ${S}/setup.py
sed -i -e 's/opensslIncludeDir = .*$/opensslIncludeDir = os.getenv("STAGING_INCDIR")/;' ${S}/setup.py
sed -i -e 's/opensslLibraryDir = .*$/opensslLibraryDir = os.getenv("STAGING_LIBDIR")/;' ${S}/setup.py
if [ "${SITEINFO_BITS}" = "64" ];then
bit="64"
else
bit="32"
fi
if [ -e ${STAGING_INCDIR}/openssl/opensslconf-${bit}.h ]; then
for i in SWIG/_ec.i SWIG/_evp.i; do
sed -i -e "s/opensslconf.*\./opensslconf-${bit}\./" "$i"
done
elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-n${bit}.h ] ;then
for i in SWIG/_ec.i SWIG/_evp.i; do
sed -i -e "s/opensslconf.*\./opensslconf-n${bit}\./" "$i"
done
fi
}

View File

@ -1,22 +0,0 @@
HOMEPAGE = "https://pypi.python.org/pypi/redis/"
SUMMARY = "Python client for Redis key-value store"
DESCRIPTION = "The Python interface to the Redis key-value store."
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=51d9ad56299ab60ba7be65a621004f27"
PR = "r0"
SRCNAME = "redis"
SRC_URI = "https://pypi.python.org/packages/source/r/redis/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "7619221ad0cbd124a5687458ea3f5289"
SRC_URI[sha256sum] = "a4fb37b02860f6b1617f6469487471fd086dd2d38bbce640c2055862b9c4019c"
S = "${WORKDIR}/${SRCNAME}-${PV}"
DEFAULT_PREFERENCE = "-1"
inherit setuptools
RDEPENDS_${PN} = "redis"

View File

@ -1,2 +0,0 @@
require python-websocket-client.inc
inherit setuptools

View File

@ -1,33 +0,0 @@
DESCRIPTION = "The Swiss Army knife of Python web development"
HOMEPAGE = "https://pypi.python.org/pypi/Werkzeug/"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a68f5361a2b2ca9fdf26b38aaecb6faa"
PR = "r0"
SRCNAME = "Werkzeug"
SRC_URI = "https://pypi.python.org/packages/source/W/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "66a488e0ac50a9ec326fe020b3083450"
SRC_URI[sha256sum] = "9d2771e4c89be127bc4bac056ab7ceaf0e0064c723d6b6e195739c3af4fd5c1d"
S = "${WORKDIR}/${SRCNAME}-${PV}"
DEFAULT_PREFERENCE = "-1"
inherit setuptools
RDEPENDS_${PN} += "python-io \
python-datetime \
python-email \
python-zlib \
python-pkgutil \
python-html \
python-shell \
python-pprint \
python-subprocess \
python-netserver"
CLEANBROKEN = "1"

View File

@ -0,0 +1,22 @@
HOMEPAGE = "https://github.com/boto/boto"
SUMMARY = "Amazon Web Services API"
DESCRIPTION = "\
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, \
which allows Python developers to write software that makes use of services like \
Amazon S3 and Amazon EC2. \
"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://setup.py;md5=0149f3d994965905689bbefa0212efe2"
SRCNAME = "boto3"
SRC_URI = "https://pypi.python.org/packages/source/b/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "79936a15612b8ef762eb1274a936cea5"
SRC_URI[sha256sum] = "5222edc5b20d5c6ab7440fc4f89f987ead05be37ff5cc5359a3b9148d9b5a51e"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools3

View File

@ -8,19 +8,18 @@ DESCRIPTION = "\
"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=f6df6ab9f1b615a140ebb2a48f61bddc"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=9577253c24027f0c6027a4fded2134fc"
PR = "r0"
SRCNAME = "bugsnag"
SRC_URI = "https://pypi.python.org/packages/source/b/bugsnag/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "e16360d86979890892cd388635f213e7"
SRC_URI[sha256sum] = "093934b3cd1d36ba2b89cfe1673b14ba59043417fe500a02dbf6de0df43ea962"
SRC_URI[md5sum] = "b97e16b068b5e7fdc3e3fa9f684e56cd"
SRC_URI[sha256sum] = "67b8c01719e92f193f8424595a94e3a527bc0f9fcb7f2bc47a20af87de81929d"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
inherit setuptools3
DEPENDS += "python-webob python-flask python-blinker"
DEPENDS += "python3-webob python3-flask python3-blinker"

View File

@ -1,22 +1,21 @@
HOMEPAGE = "https://pypi.python.org/pypi/Flask-Cors/1.10.3"
HOMEPAGE = "https://pypi.python.org/pypi/Flask-Cors/"
SUMMARY = "A Flask extension adding a decorator for CORS support"
DESCRIPTION = "\
A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible \
"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4784781a5ee9fed9c50272e733e07685"
LIC_FILES_CHKSUM = "file://LICENSE;md5=118fecaa576ab51c1520f95e98db61ce"
DEPENDS += "python-six python-flask"
DEPENDS += "python3-six python3-flask"
PR = "r0"
SRCNAME = "Flask-Cors"
SRC_URI = "https://pypi.python.org/packages/source/F/Flask-Cors/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "4f3c75ace0f724d1de167bd73745c965"
SRC_URI[sha256sum] = "9e6927aa0a46f314bca0ec63eb871cee898a162adfdd5b65224db7a008287423"
SRC_URI[md5sum] = "551cc4c0305a171d28caa2b3bc838867"
SRC_URI[sha256sum] = "72170423eb4612f0847318afff8c247b38bd516b7737adfc10d1c2cdbb382d16"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
inherit setuptools3

View File

@ -6,19 +6,18 @@ DESCRIPTION = "\
"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause & MIT & Python-2.0 & BSD-2-Clause & NewRelic"
LIC_FILES_CHKSUM = "file://newrelic/LICENSE;md5=0f6cc160a8ed6759faa408a30b6ac978"
LIC_FILES_CHKSUM = "file://newrelic/LICENSE;md5=2c3b4d48a631fe909df7a767726d4f6c"
PR = "r0"
SRCNAME = "newrelic"
SRC_URI = "https://pypi.python.org/packages/source/n/newrelic/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "f8c9bf996d040a11847d14682b290eff"
SRC_URI[sha256sum] = "aa8869413c21aff441a77582df1e0fdc0f67342760eb7560d33ed3bbed7edf7b"
SRC_URI[md5sum] = "45099c6d88dcf474267226469caa845e"
SRC_URI[sha256sum] = "0e651f2ff48dd1fc538fc1297892cf726d1ad4fc0b2578aae6a47f10f16afb2c"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
inherit setuptools3
FILES_${PN}-dbg += "\
${PYTHON_SITEPACKAGES_DIR}/newrelic-${PV}/newrelic/*/.debug \

View File

@ -9,9 +9,9 @@ PYPI_PACKAGE = "WebOb"
SRC_URI[md5sum] = "1761f416e8cf53f6fb674149cc223bd1"
SRC_URI[sha256sum] = "05aaab7975e0ee8af2026325d656e5ce14a71f1883c52276181821d6d5bf7086"
inherit setuptools pypi
inherit setuptools3 pypi
RDEPENDS_${PN} += " \
python-sphinx \
python3-sphinx \
"