python{3, }-protobuf: consolidate CLEANBROKEN
PATCH 1/6 python{3, }-protobuf: consolidate CLEANBROKEN
Since python-protobuf and python3-protobuf share the same build instructions, it's sane to clarify for both at the same place, that running
setup.py clean
is wrong in configure stage.
--- meta-python/recipes-devtools/python/python-protobuf.inc | 4 ++++ meta-python/recipes-devtools/python/python-protobuf_3.6.0.bb | 4 ---- meta-python/recipes-devtools/python/python3-protobuf_3.6.0.bb | 1 - 3 files changed, 4 insertions(+), 5 deletions(-)
meta-python/recipes-devtools/python/python-protobuf.inc +4 -0
@@ -10,6 +10,10 @@ inherit pypi SRC_URI[md5sum] = "074abcceee0d795ba34ad6430f71d0e8" SRC_URI[sha256sum] = "a37836aa47d1b81c2db1a6b7a5e79926062b5d76bd962115a0e615551be2b48d" +# http://errors.yoctoproject.org/Errors/Details/184715/ +# Can't find required file: ../src/google/protobuf/descriptor.proto +CLEANBROKEN = "1" + UPSTREAM_CHECK_REGEX = "protobuf/(?P<pver>\d+(\.\d+)+)/" RDEPENDS_${PN} += " \
meta-python/recipes-devtools/python/python-protobuf_3.6.0.bb +0 -4
@@ -1,6 +1,2 @@ inherit setuptools require python-protobuf.inc - -# http://errors.yoctoproject.org/Errors/Details/184715/ -# Can't find required file: ../src/google/protobuf/descriptor.proto -CLEANBROKEN = "1"
meta-python/recipes-devtools/python/python3-protobuf_3.6.0.bb +0 -1
@@ -1,3 +1,2 @@ inherit setuptools3 require python-protobuf.inc -CLEANBROKEN = "1"
Signature · 1 line
2.17.1
PATCH 2/6 python{,3}-grpcio: update to 1.14.1
Update python-grpcio and add related python3-grpcio recipe for recent features and bug-fixes.
--- .../recipes-devtools/python/python-grpcio.inc | 25 +++++++++++++++++++ ...-Do-not-mix-C-and-C-compiler-options.patch | 4 +-- .../python/python-grpcio_1.14.1.bb | 6 +++++ .../python/python-grpcio_1.8.4.bb | 25 ------------------- .../python/python3-grpcio_1.14.1.bb | 2 ++ 5 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python-grpcio.inc create mode 100644 meta-python/recipes-devtools/python/python-grpcio_1.14.1.bb delete mode 100644 meta-python/recipes-devtools/python/python-grpcio_1.8.4.bb create mode 100644 meta-python/recipes-devtools/python/python3-grpcio_1.14.1.bb
meta-python/recipes-devtools/python/python-grpcio.inc new file +25 -0
@@ -0,0 +1,25 @@ +DESCRIPTION = "Google gRPC" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" + +DEPENDS_append = "${PYTHON_PN}-protobuf" + +FILESEXTRAPATHS_prepend := "${THISDIR}/python-grpcio:" +SRC_URI_append_class-target = " file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch " + +RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-six \ +" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +inherit pypi + +SRC_URI[md5sum] = "0987ae2e47b5103de3cacc437874a3c5" +SRC_URI[sha256sum] = "4bf23666e763ca7ff6010465864e9f088f4ac7ecc1e11abd6f85b250e66b2c05" + +CLEANBROKEN = "1" + +BBCLASSEXTEND = "native nativesdk"
meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +2 -2
@@ -22,11 +22,11 @@ Index: grpcio-1.8.4/setup.py =================================================================== --- grpcio-1.8.4.orig/setup.py +++ grpcio-1.8.4/setup.py -@@ -115,7 +115,7 @@ if EXTRA_ENV_COMPILE_ARGS is None: +@@ -135,7 +135,7 @@ if EXTRA_ENV_COMPILE_ARGS is None: else: EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64' elif "linux" in sys.platform: -- EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions' +- EXTRA_ENV_COMPILE_ARGS += ' -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions' + EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions' elif "darwin" in sys.platform: EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
meta-python/recipes-devtools/python/python-grpcio_1.14.1.bb new file +6 -0
@@ -0,0 +1,6 @@ +inherit setuptools +require python-grpcio.inc + +RDEPENDS_${PN} += " python-enum34 \ + python-futures \ +"
meta-python/recipes-devtools/python/python-grpcio_1.8.4.bb deleted +0 -25
@@ -1,25 +0,0 @@ -DESCRIPTION = "Google gRPC" -HOMEPAGE = "http://www.grpc.io/" -SECTION = "devel/python" - -DEPENDS = "python-protobuf" - -SRC_URI_append_class-target = " file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch " - -RDEPENDS_${PN} = "python-enum34 \ - python-futures \ - python-protobuf \ - python-setuptools \ - python-six \ -" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" - -inherit pypi setuptools - -SRC_URI[md5sum] = "7860f7c61de3890323670b7b1ff63e56" -SRC_URI[sha256sum] = "88d87aab9c7889b3ab29dd74aac1a5493ed78b9bf5afba1c069c9dd5531f951d" - -# For usage in other recipes when compiling protobuf files (e.g. by grpcio-tools) -BBCLASSEXTEND = "native"
meta-python/recipes-devtools/python/python3-grpcio_1.14.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools3 +require python-grpcio.inc
Signature · 1 line
2.17.1
PATCH 3/6 python{, 3}-grpcio-tools: update 1.8.4 -> 1.14.1
In reply to Jens RehsackAlign recipe for python protobuf code generator for gRPC with grpc itself and python-grpcio.
--- .../python/python-grpcio-tools.inc | 16 ++++++++++++++++ .../python/python-grpcio-tools_1.14.1.bb | 2 ++ .../python/python-grpcio-tools_1.8.4.bb | 17 ----------------- .../python/python3-grpcio-tools_1.14.1.bb | 2 ++ 4 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python-grpcio-tools.inc create mode 100644 meta-python/recipes-devtools/python/python-grpcio-tools_1.14.1.bb delete mode 100644 meta-python/recipes-devtools/python/python-grpcio-tools_1.8.4.bb create mode 100644 meta-python/recipes-devtools/python/python3-grpcio-tools_1.14.1.bb
meta-python/recipes-devtools/python/python-grpcio-tools.inc new file +16 -0
@@ -0,0 +1,16 @@ +DESCRIPTION = "Google gRPC tools" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" + +DEPENDS_append = "${PYTHON_PN}-grpcio" +RDEPENDS_${PN} = "${PYTHON_PN}-grpcio" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +inherit pypi + +SRC_URI[md5sum] = "b2fabfb54c7824c1e49a02de2aa6628e" +SRC_URI[sha256sum] = "4ce5aa660d7884f23aac1eafa93b97a4c3e2b512edff871e91fdb6ee86ebd5ea" + +BBCLASSEXTEND = "native nativesdk"
meta-python/recipes-devtools/python/python-grpcio-tools_1.14.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools +require python-grpcio-tools.inc
meta-python/recipes-devtools/python/python-grpcio-tools_1.8.4.bb deleted +0 -17
@@ -1,17 +0,0 @@ -DESCRIPTION = "Google gRPC tools" -HOMEPAGE = "http://www.grpc.io/" -SECTION = "devel/python" - -DEPENDS = "python-grpcio" -RDEPENDS_${PN} = "python-grpcio" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" - -inherit pypi setuptools - -SRC_URI[md5sum] = "e04e65afe60410cf178ff2698f052a7c" -SRC_URI[sha256sum] = "edc84c09039d3a01012ccd97450abd06ee6b980710f6d9f191b50deb6774a75c" - -# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) -BBCLASSEXTEND = "native"
meta-python/recipes-devtools/python/python3-grpcio-tools_1.14.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools3 +require python-grpcio-tools.inc
Signature · 1 line
2.17.1
PATCH 4/6 python{, 3}-pint: add recipes for python2 and python3
In reply to Jens RehsackAdd recipe for physical quantities module for python2 and python3 infrastructure of Yocto.
--- .../recipes-devtools/python/python-pint.inc | 15 +++++++++++++++ .../recipes-devtools/python/python-pint_0.8.1.bb | 2 ++ .../recipes-devtools/python/python3-pint_0.8.1.bb | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-pint.inc create mode 100644 meta-python/recipes-devtools/python/python-pint_0.8.1.bb create mode 100644 meta-python/recipes-devtools/python/python3-pint_0.8.1.bb
meta-python/recipes-devtools/python/python-pint.inc new file +15 -0
@@ -0,0 +1,15 @@ +DESCRIPTION = "Interval arithmetic for Python" +HOMEPAGE = "https://github.com/AlexandreDecan/python-intervals" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PYPI_PACKAGE := "Pint" + +inherit pypi + +SRC_URI[md5sum] = "e1f80f3f8fc4e61f68ad3912db26b3a8" +SRC_URI[sha256sum] = "afcf31443a478c32bbac4b00337ee9026a13d0e2ac83d30c79151462513bb0d4" + +BBCLASSEXTEND = "native"
meta-python/recipes-devtools/python/python-pint_0.8.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools +require python-pint.inc
meta-python/recipes-devtools/python/python3-pint_0.8.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools3 +require python-pint.inc
Signature · 1 line
2.17.1
PATCH 5/6 python{, 3}-intervals: add recipes for python2/3
In reply to Jens RehsackAdd recipe for interval arithmetic for python supporting python2 as well as python3 infrastructure of Yocto.
--- .../recipes-devtools/python/python-intervals.inc | 15 +++++++++++++++ .../python/python-intervals_1.5.4.bb | 2 ++ .../python/python3-intervals_1.5.4.bb | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-intervals.inc create mode 100644 meta-python/recipes-devtools/python/python-intervals_1.5.4.bb create mode 100644 meta-python/recipes-devtools/python/python3-intervals_1.5.4.bb
meta-python/recipes-devtools/python/python-intervals.inc new file +15 -0
@@ -0,0 +1,15 @@ +DESCRIPTION = "Interval arithmetic for Python" +HOMEPAGE = "https://github.com/AlexandreDecan/python-intervals" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PYPI_PACKAGE := "python-intervals" + +inherit pypi + +SRC_URI[md5sum] = "a35dd44269fdb134bf19cfd80cb2c120" +SRC_URI[sha256sum] = "a8a15b7c2fadb8465310f44aa96e384828b35a29de38ac74738cd665924cb8ac" + +BBCLASSEXTEND = "native"
meta-python/recipes-devtools/python/python-intervals_1.5.4.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools +require python-intervals.inc
meta-python/recipes-devtools/python/python3-intervals_1.5.4.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools3 +require python-intervals.inc
Signature · 1 line
2.17.1
PATCH 6/6 python{, 3}-m2crypto: update from 0.26.4 -> 0.30.1
In reply to Jens RehsackUpdating recipe for crypto and SSL toolkit for python and support python3 infrastructure of Yocto as well as the already supported python2 line.
---
...m2crypto_0.26.4.bb => python-m2crypto.inc} | 10 +++---
...k-in-sysroot-not-in-host-directories.patch | 36 +++++++++----------
.../cross-compile-platform.patch | 23 ++++++------
.../m2crypto-0.26.4-gcc_macros.patch | 12 ++-----
.../python/python-m2crypto_0.30.1.bb | 2 ++
.../python/python3-m2crypto_0.30.1.bb | 2 ++
6 files changed, 41 insertions(+), 44 deletions(-)
rename meta-python/recipes-devtools/python/{python-m2crypto_0.26.4.bb => python-m2crypto.inc} (87%)
create mode 100644 meta-python/recipes-devtools/python/python-m2crypto_0.30.1.bb
create mode 100644 meta-python/recipes-devtools/python/python3-m2crypto_0.30.1.bbmeta-python/recipes-devtools/python/python-m2crypto.inc renamed from meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb +6 -4
@@ -1,18 +1,20 @@ SUMMARY = "A Python crypto and SSL toolkit" HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto" -LICENSE = "BSD" +LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" +FILESEXTRAPATHS_prepend := "${THISDIR}/python-m2crypto:" + SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ file://cross-compile-platform.patch \ file://m2crypto-0.26.4-gcc_macros.patch \ " -SRC_URI[md5sum] = "5c74c25ba8b45122318a165a3a2059ad" -SRC_URI[sha256sum] = "5cae7acc0b34821f8c0ddf6665e482893fe1f198ad6379e61ffa9d8e65f5c199" +SRC_URI[md5sum] = "7fce3cbf85eb84a669682892b935746b" +SRC_URI[sha256sum] = "a1b2751cdadc6afac3df8a5799676b7b7c67a6ad144bb62d38563062e7cd3fc6" PYPI_PACKAGE = "M2Crypto" -inherit pypi setuptools siteinfo +inherit pypi siteinfo DEPENDS += "openssl swig-native" RDEPENDS_${PN} += "python-typing"
meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch +16 -20
@@ -14,26 +14,22 @@ diff --git a/setup.py b/setup.py index 3407c82..15ed7cd 100644 --- a/setup.py +++ b/setup.py -@@ -127,7 +127,7 @@ class _M2CryptoBuildExt(build_ext.build_ext): - self.openssl = os.path.join(self.openssl, 'OpenSSL') - else: - self.libraries = ['ssl', 'crypto'] -- self.openssl = '/usr' -+ self.openssl = os.environ.get( "STAGING_DIR" ) +@@ -130,6 +130,7 @@ + self.set_undefined_options('build', ('bundledlls', 'bundledlls')) - def finalize_options(self): - '''Overloaded build_ext implementation to append custom openssl -@@ -143,8 +143,8 @@ class _M2CryptoBuildExt(build_ext.build_ext): - if _openssl and os.path.isdir(_openssl): - self.openssl = _openssl + self.libraries = ['ssl', 'crypto'] ++ self.openssl = os.environ.get( "STAGING_DIR" ) + if sys.platform == 'win32': + self.libraries = ['ssleay32', 'libeay32'] + if self.openssl and openssl_version(self.openssl, 0x10100000, True): +@@ -150,8 +151,8 @@ -- self.include_dirs.append(os.path.join(self.openssl, 'include')) -- openssl_library_dir = os.path.join(self.openssl, 'lib') -+ self.include_dirs.append(os.environ.get( "STAGING_INCDIR" )) -+ openssl_library_dir = os.environ.get( "STAGING_LIBDIR" ) + if self.openssl is not None: + log.debug('self.openssl = %s', self.openssl) +- openssl_library_dir = os.path.join(self.openssl, 'lib') +- openssl_include_dir = os.path.join(self.openssl, 'include') ++ openssl_library_dir = os.environ.get( "STAGING_LIBDIR" ) ++ openssl_include_dir = os.environ.get( "STAGING_INCDIR" ) - if platform.system() == "Linux": - if _multiarch: # on Fedora/RHEL it is an empty string --- -2.7.4 - + self.library_dirs.append(openssl_library_dir) + self.include_dirs.append(openssl_include_dir)
meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch +13 -10
@@ -4,27 +4,30 @@ since it pokes at the system for getting architecture values Upstream-Status: Inappropriate Signed-off-by: Khem Raj <[email protected]> -Index: M2Crypto-0.26.0/setup.py -=================================================================== ---- M2Crypto-0.26.0.orig/setup.py -+++ M2Crypto-0.26.0/setup.py -@@ -141,19 +141,6 @@ class _M2CryptoBuildExt(build_ext.build_ - self.include_dirs.append( - os.path.join(self.openssl, 'include', 'openssl')) +diff --git a/setup.py b/setup.py +index 3407c82..15ed7cd 100644 +--- a/setup.py ++++ b/setup.py +@@ -160,22 +160,6 @@ + log.debug('self.include_dirs = %s', self.include_dirs) + log.debug('self.library_dirs = %s', self.library_dirs) +- if platform.system() == "Linux": - # For RedHat-based distros, the '-D__{arch}__' option for - # Swig needs to be normalized, particularly on i386. - mach = platform.machine().lower() - if mach in ('i386', 'i486', 'i586', 'i686'): - arch = '__i386__' -- elif mach in ('ppc64', 'powerpc64'): +- elif mach in ('ppc64', 'powerpc64', 'ppc64le', 'ppc64el'): - arch = '__powerpc64__' - elif mach in ('ppc', 'powerpc'): - arch = '__powerpc__' - else: - arch = '__%s__' % mach - self.swig_opts.append('-D%s' % arch) +- if mach in ('ppc64le', 'ppc64el'): +- self.swig_opts.append('-D_CALL_ELF=2') - self.swig_opts.extend(['-I%s' % i for i in self.include_dirs]) - self.swig_opts.append('-includeall') - self.swig_opts.append('-modern') + + # Some Linux distributor has added the following line in
meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch +2 -10
@@ -2,17 +2,9 @@ Imported from Fedora --- M2Crypto/SWIG/_m2crypto.i 2017-09-26 11:26:33.000000000 +0200 +++ M2Crypto-0.26.4/SWIG/_m2crypto.i 2017-09-26 21:04:14.080330741 +0200 -@@ -7,6 +7,7 @@ - * Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved. - * - */ -+%import "gcc_macros.h" - - %module(threads=1) m2crypto - /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere. @@ -15,11 +16,6 @@ - %nothreadblock; - %nothreadallow; + #endif + %} -#if SWIG_VERSION >= 0x030000 -#define __WCHAR_MAX__ __WCHAR_MAX
meta-python/recipes-devtools/python/python-m2crypto_0.30.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools +require python-m2crypto.inc
meta-python/recipes-devtools/python/python3-m2crypto_0.30.1.bb new file +2 -0
@@ -0,0 +1,2 @@ +inherit setuptools3 +require python-m2crypto.inc
Signature · 1 line
2.17.1