Skip to contentSkip to conversation

20/32: python-m2crypto: Upgrade to 0.26.0

oe-commits Martin Jansa 2 participants 3 messages Sep 17, 2017 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

There is one more issue with this change. It fails to build on aarch64 (e.g. raspberrypi3-64):

building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include -Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include/python2.7 -Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include -Ipython-m2crypto/0.26.0-r0/recipe-sysroot/include/x86_64-linux-gnu -includeall -modern -builtin -outdir python-m2crypto/0.26.0-r0/M2Crypto-0.26.0/M2Crypto
-o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i python-m2crypto/0.26.0-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:53:
Error: Unable to find 'openssl/opensslconf-32.h'
error: command 'swig' failed with exit status 1
ERROR: python setup.py build execution failed.

I've reverted this change and confirmed that it built ok with python-m2crypto_0.25.1.bb

Quoted 129 lines · On Thu, Aug 31, 2017 at 2:42 PM, <[email protected]> wrote:

This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master
in repository meta-openembedded.

commit f50e344cffbf0e1513308f0a2c845e21b272f1b5
Author: Khem Raj <[email protected]>
AuthorDate: Mon Aug 28 19:46:06 2017 -0700

python-m2crypto: Upgrade to 0.26.0

Use proper LICENCE file for LIC_FILES_CHKSUM
Update homepage to point to gitlab
Fix cross-build arch

---
 .../python-m2crypto/cross-compile-platform.patch   | 30
++++++++++++++++++++++
 ...2crypto_0.25.1.bb => python-m2crypto_0.26.0.bb} | 21 +++++++--------
 2 files changed, 41 insertions(+), 10 deletions(-)
meta-python/recipes-devtools/python/python-m2crypto/cross- renamed from meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch +0 -0

compile-platform.patch
new file mode 100644
index 0000000..c6654e5

meta-python/recipes-devtools/python/python-m2crypto/cross- new file +0 -0

compile-platform.patch

meta-python/recipes-devtools/python/python-m2crypto/cross- new file +30 -0
@@ -0,0 +1,30 @@
+Do not compute platform, this does not work in cross compile environment
+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'))
+
+-            # 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'):
+-                arch = '__powerpc64__'
+-            elif mach in ('ppc', 'powerpc'):
+-                arch = '__powerpc__'
+-            else:
+-                arch = '__%s__' % mach
+-            self.swig_opts.append('-D%s' % arch)
+-
+         self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
+         self.swig_opts.append('-includeall')
+         self.swig_opts.append('-modern')
meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +2 -4
similarity index 64%
rename from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb
rename to meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb
index 72523bd..4b4fbbb 100644
@@ -1,13 +1,14 @@
 SUMMARY = "A Python crypto and SSL toolkit"
-HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
+HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
 
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=95295693f047bb8f76928251a6154a60"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
 
-SRC_URI[md5sum] = "040234289fbef5bed4029f0f7d1dae35"
-SRC_URI[sha256sum] = "ac303a1881307a51c85ee8b1d8784

4d9866ee823b4fdbc52f7e79187c2d9acef"

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +0 -2
-
-SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch

"
+SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +4 -0
+            file://cross-compile-platform.patch \
+           "
+SRC_URI[md5sum] = "9f02f0b88fbe225cc6ea8680945cafa0"
+SRC_URI[sha256sum] = "05d94fd9b2dae2fb8e072819a795f

0e05d3611b09ea185f68e1630530ec09ae8"

PYPI_PACKAGE = "M2Crypto"
inherit pypi setuptools siteinfo

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +4 -5
@@ -18,16 +19,16 @@ RDEPENDS_${PN} += "python-typing"
 DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}
-I${STAGING_INCDIR}"
 DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}"
 
-inherit setuptools
-
-SWIG_FEATURES_x86-64 = "-D__x86_64__"
-SWIG_FEATURES ?= ""
+SWIG_FEATURES_x86 = "-D__i386__"
+SWIG_FEATURES ?= "-D__${HOST_ARCH}__"
 export SWIG_FEATURES
 
 # Get around a problem with swig, but only if the
 # multilib header file exists.
 #
 do_compile_prepend() {
+    ${CPP} -dM - < /dev/null | grep -v __STDC__ | grep -v
 __REGISTER_PREFIX__ | grep -v __GNUC__ \
+       | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' >

SWIG/gcc_macros.h

     if [ "${SITEINFO_BITS}" = "64" ];then
         bit="64"
     else

--
To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits

#3 lore raw
Quoted 10 lines · Martin Jansa

There is one more issue with this change. It fails to build on aarch64 (e.g. raspberrypi3-64):

building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include

(quoted diff) +0 -4
-Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include/python2.7
-Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include
-Ipython-m2crypto/0.26.0-r0/recipe-sysroot/include/x86_64-linux-gnu
-includeall -modern -builtin -outdir
Quoted 7 lines

python-m2crypto/0.26.0-r0/M2Crypto-0.26.0/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i python-m2crypto/0.26.0-r0/recipe-sysroot/usr/include/openssl/opensslconf.h:53:
Error: Unable to find 'openssl/opensslconf-32.h'
error: command 'swig' failed with exit status 1
ERROR: python setup.py build execution failed.

I will check this. do you use 32bit OS on build host ?

Quoted 135 lines

I've reverted this change and confirmed that it built ok with python-m2crypto_0.25.1.bb

Quoted 129 lines · On Thu, Aug 31, 2017 at 2:42 PM, <[email protected]> wrote:

This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master
in repository meta-openembedded.

commit f50e344cffbf0e1513308f0a2c845e21b272f1b5
Author: Khem Raj <[email protected]>
AuthorDate: Mon Aug 28 19:46:06 2017 -0700

python-m2crypto: Upgrade to 0.26.0

Use proper LICENCE file for LIC_FILES_CHKSUM
Update homepage to point to gitlab
Fix cross-build arch

---
 .../python-m2crypto/cross-compile-platform.patch   | 30
++++++++++++++++++++++
 ...2crypto_0.25.1.bb => python-m2crypto_0.26.0.bb} | 21 +++++++--------
 2 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch new file mode 100644
index 0000000..c6654e5
--- /dev/null
+++
b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch

(quoted diff) +30 -0
@@ -0,0 +1,30 @@
+Do not compute platform, this does not work in cross compile environment
+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'))
+
+-            # 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'):
+-                arch = '__powerpc64__'
+-            elif mach in ('ppc', 'powerpc'):
+-                arch = '__powerpc__'
+-            else:
+-                arch = '__%s__' % mach
+-            self.swig_opts.append('-D%s' % arch)
+-
+         self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
+         self.swig_opts.append('-includeall')
+         self.swig_opts.append('-modern')
meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +2 -4
similarity index 64%
rename from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb
rename to meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb
index 72523bd..4b4fbbb 100644
@@ -1,13 +1,14 @@
 SUMMARY = "A Python crypto and SSL toolkit"
-HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
+HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
 
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=95295693f047bb8f76928251a6154a60"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
 
-SRC_URI[md5sum] = "040234289fbef5bed4029f0f7d1dae35"
-SRC_URI[sha256sum] =

"ac303a1881307a51c85ee8b1d87844d9866ee823b4fdbc52f7e79187c2d9acef"

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +0 -2
-
-SRC_URI +=

"file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch " +SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +4 -0
+            file://cross-compile-platform.patch \
+           "
+SRC_URI[md5sum] = "9f02f0b88fbe225cc6ea8680945cafa0"
+SRC_URI[sha256sum] =

"05d94fd9b2dae2fb8e072819a795f0e05d3611b09ea185f68e1630530ec09ae8"

PYPI_PACKAGE = "M2Crypto"
inherit pypi setuptools siteinfo

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +4 -5
@@ -18,16 +19,16 @@ RDEPENDS_${PN} += "python-typing"
 DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}
-I${STAGING_INCDIR}"
 DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}"
 
-inherit setuptools
-
-SWIG_FEATURES_x86-64 = "-D__x86_64__"
-SWIG_FEATURES ?= ""
+SWIG_FEATURES_x86 = "-D__i386__"
+SWIG_FEATURES ?= "-D__${HOST_ARCH}__"
 export SWIG_FEATURES
 
 # Get around a problem with swig, but only if the
 # multilib header file exists.
 #
 do_compile_prepend() {
+    ${CPP} -dM - < /dev/null | grep -v __STDC__ | grep -v
 __REGISTER_PREFIX__ | grep -v __GNUC__ \
+       | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' >

SWIG/gcc_macros.h

     if [ "${SITEINFO_BITS}" = "64" ];then
         bit="64"
     else

--
To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits

#4 lore raw

Thanks, no 64bit Ubuntu 14.04

Quoted 170 lines · Khem Raj
Quoted 1 line · Martin Jansa

There is one more issue with this change. It fails to build on aarch64

(e.g.

Quoted 10 lines

raspberrypi3-64):

building 'M2Crypto._m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include

(quoted diff) +0 -4
-Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include/python2.7
-Ipython-m2crypto/0.26.0-r0/recipe-sysroot/usr/include
-Ipython-m2crypto/0.26.0-r0/recipe-sysroot/include/x86_64-linux-gnu
-includeall -modern -builtin -outdir

python-m2crypto/0.26.0-r0/M2Crypto-0.26.0/M2Crypto -o

SWIG/_m2crypto_wrap.c

Quoted 2 lines

SWIG/_m2crypto.i python-m2crypto/0.26.0-r0/recipe-sysroot/usr/include/

openssl/opensslconf.h:53:

Quoted 4 lines

Error: Unable to find 'openssl/opensslconf-32.h'
error: command 'swig' failed with exit status 1
ERROR: python setup.py build execution failed.

I will check this. do you use 32bit OS on build host ?

Quoted 26 lines

I've reverted this change and confirmed that it built ok with python-m2crypto_0.25.1.bb

Quoted 22 lines · On Thu, Aug 31, 2017 at 2:42 PM, <[email protected]> wrote:

This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master
in repository meta-openembedded.

commit f50e344cffbf0e1513308f0a2c845e21b272f1b5
Author: Khem Raj <[email protected]>
AuthorDate: Mon Aug 28 19:46:06 2017 -0700

python-m2crypto: Upgrade to 0.26.0

Use proper LICENCE file for LIC_FILES_CHKSUM
Update homepage to point to gitlab
Fix cross-build arch

---
 .../python-m2crypto/cross-compile-platform.patch   | 30
++++++++++++++++++++++
 ...2crypto_0.25.1.bb => python-m2crypto_0.26.0.bb} | 21

+++++++--------

Quoted 4 lines
Quoted 4 lines
 2 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-

platform.patch

Quoted 1 line
Quoted 1 line

b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-

platform.patch

Quoted 5 lines
Quoted 5 lines

new file mode 100644
index 0000000..c6654e5
--- /dev/null
+++
b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-

platform.patch

Quoted 2 lines

Review line 1

Quoted 2 lines
(quoted diff) +1 -0
@@ -0,0 +1,30 @@
+Do not compute platform, this does not work in cross compile

environment

Quoted 22 lines
Quoted 22 lines
(quoted diff) +22 -0
+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'))
+
+-            # 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'):
+-                arch = '__powerpc64__'
+-            elif mach in ('ppc', 'powerpc'):
+-                arch = '__powerpc__'
Quoted 8 lines

Review

Quoted 8 lines
(quoted diff) +7 -0
+-            else:
+-                arch = '__%s__' % mach
+-            self.swig_opts.append('-D%s' % arch)
+-
+         self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
+         self.swig_opts.append('-includeall')
+         self.swig_opts.append('-modern')
(quoted diff) +0 -0

m2crypto_0.25.1.bb

Quoted 3 lines
Quoted 3 lines

b/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb similarity index 64%
rename from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.

bb

Quoted 11 lines

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb line 5

Quoted 11 lines

rename to meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb index 72523bd..4b4fbbb 100644

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +1 -2
@@ -1,13 +1,14 @@
 SUMMARY = "A Python crypto and SSL toolkit"
-HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
+HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
 
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=95295693f047bb8f76928251a6154a

60"

Quoted 1 line

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb line 5

Quoted 1 line
meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +1 -0
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b99180

0e"

Quoted 52 lines
Quoted 50 lines
meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +0 -2
-SRC_URI[md5sum] = "040234289fbef5bed4029f0f7d1dae35"
-SRC_URI[sha256sum] =

"ac303a1881307a51c85ee8b1d87844d9866ee823b4fdbc52f7e79187c2d9acef"

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +0 -2
-
-SRC_URI +=

"file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch " +SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +4 -0
+            file://cross-compile-platform.patch \
+           "
+SRC_URI[md5sum] = "9f02f0b88fbe225cc6ea8680945cafa0"
+SRC_URI[sha256sum] =

"05d94fd9b2dae2fb8e072819a795f0e05d3611b09ea185f68e1630530ec09ae8"

PYPI_PACKAGE = "M2Crypto"
inherit pypi setuptools siteinfo

meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb +4 -5
@@ -18,16 +19,16 @@ RDEPENDS_${PN} += "python-typing"
 DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}
-I${STAGING_INCDIR}"
 DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}"
 
-inherit setuptools
-
-SWIG_FEATURES_x86-64 = "-D__x86_64__"
-SWIG_FEATURES ?= ""
+SWIG_FEATURES_x86 = "-D__i386__"
+SWIG_FEATURES ?= "-D__${HOST_ARCH}__"
 export SWIG_FEATURES
 
 # Get around a problem with swig, but only if the
 # multilib header file exists.
 #
 do_compile_prepend() {
+    ${CPP} -dM - < /dev/null | grep -v __STDC__ | grep -v
 __REGISTER_PREFIX__ | grep -v __GNUC__ \
+       | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' >

SWIG/gcc_macros.h

     if [ "${SITEINFO_BITS}" = "64" ];then
         bit="64"
     else

--
To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits