public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/
@ 2019-04-18 15:11 Mike Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2019-04-18 15:11 UTC (permalink / raw
  To: gentoo-commits

commit:     63380ad8d37ce2a83a958f6bcc6b3d721fe2ff6d
Author:     Gábor Oszkár Dénes <gaboroszkar <AT> protonmail <DOT> com>
AuthorDate: Sun Mar 24 22:11:52 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Apr 18 15:10:11 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63380ad8

dev-python/m2crypto: Fix crossdev

Fix crossdev in version 0.31.0-r2.

Closes: https://bugs.gentoo.org/665544
Closes: https://github.com/gentoo/gentoo/pull/11484
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Signed-off-by: Gábor Oszkár Dénes <gaboroszkar <AT> protonmail.com>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch | 12 ++++++++++++
 dev-python/m2crypto/m2crypto-0.31.0-r2.ebuild            |  7 ++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch b/dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch
new file mode 100644
index 00000000000..ff8388988ad
--- /dev/null
+++ b/dev-python/m2crypto/files/m2crypto-crossdev-0.31.0.patch
@@ -0,0 +1,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -50,7 +50,8 @@
+                                 '*Visual*', 'VC', 'include')
+         err = glob.glob(globmask)
+     else:
+-        pid = subprocess.Popen(['cpp', '-Wp,-v', '-'],
++        pid = subprocess.Popen(os.environ.get('CPP', 'cpp').split() +
++                               ['-Wp,-v', '-'],
+                                stdin=open(os.devnull, 'r'),
+                                stdout=subprocess.PIPE,
+                                stderr=subprocess.PIPE)

diff --git a/dev-python/m2crypto/m2crypto-0.31.0-r2.ebuild b/dev-python/m2crypto/m2crypto-0.31.0-r2.ebuild
index 3d907ecee37..e3435d80ceb 100644
--- a/dev-python/m2crypto/m2crypto-0.31.0-r2.ebuild
+++ b/dev-python/m2crypto/m2crypto-0.31.0-r2.ebuild
@@ -25,7 +25,8 @@ RDEPEND="
 	libressl? ( dev-libs/libressl:0= )
 	virtual/python-typing[${PYTHON_USEDEP}]
 "
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	>=dev-lang/swig-2.0.9
 	dev-python/setuptools[${PYTHON_USEDEP}]
 "
@@ -37,18 +38,18 @@ RESTRICT=test
 
 PATCHES=(
 	"${FILESDIR}/${PN}-libressl-${PV}.patch"
+	"${FILESDIR}/${PN}-crossdev-${PV}.patch"
 )
 
 python_compile() {
 	# setup.py looks at platform.machine() to determine swig options.
 	# For exotic ABIs, we need to give swig a hint.
 	# https://bugs.gentoo.org/617946
-	# TODO: Fix cross-compiles
 	local -x SWIG_FEATURES=
 	case ${ABI} in
 		x32) SWIG_FEATURES="-D__ILP32__" ;;
 	esac
-	distutils-r1_python_compile --openssl="${EPREFIX}"/usr
+	distutils-r1_python_compile --openssl="${ESYSROOT}"/usr
 }
 
 python_test() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/
@ 2019-06-20 13:44 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2019-06-20 13:44 UTC (permalink / raw
  To: gentoo-commits

commit:     e63874eb81c33759266f9f3aa5158248c52204b9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 15:33:17 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 13:43:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e63874eb

dev-python/m2crypto: Drop old

Broken by >=OpenSSL-1.1.

Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-python/m2crypto/Manifest                       |   2 -
 .../files/m2crypto-libressl-version-check.patch    | 154 ---------------------
 dev-python/m2crypto/m2crypto-0.24.0.ebuild         |  38 -----
 dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild      |  56 --------
 dev-python/m2crypto/m2crypto-0.27.0.ebuild         |  52 -------
 dev-python/m2crypto/m2crypto-0.31.0-r1.ebuild      |  56 --------
 6 files changed, 358 deletions(-)

diff --git a/dev-python/m2crypto/Manifest b/dev-python/m2crypto/Manifest
index f6a0ec6a252..7e9058b257c 100644
--- a/dev-python/m2crypto/Manifest
+++ b/dev-python/m2crypto/Manifest
@@ -1,3 +1 @@
-DIST M2Crypto-0.24.0.tar.gz 184457 BLAKE2B 15a11dc1b13359041875e8321d0159a1a393b7f85dfbd38d650721d8a2eaed2cc2199859c3e1e3c890033711e0b137f4c78b90f04681ff44a3356558b9f55aea SHA512 c23ae0f8ac790d4ef108a217a44e994341f6bbe4e12a7fef2518d8def82331246a145e19a2504b82b790a3ad4b467d2facc8a73bb7f1190b56441d8482c66aca
-DIST M2Crypto-0.27.0.tar.gz 1119288 BLAKE2B 90e227aef9a5b4c7f5ab9bd62fbe506ea0931a6c338c530adbeb1a8303a31cc7755d13003532fe0ee4005f1997db23bed2d03cd54224dc7d89a6f23882197800 SHA512 df0f6b16f7d00a19fafbb5da5a3ececff6b4627accd00ca65e0d6f9e752a97f41016d0072c8e681475fe1d87c89b7474067068c0bfce6c68a30baddeb31bfac2
 DIST M2Crypto-0.31.0.tar.gz 1292016 BLAKE2B 3f1e0e8f686719ff87fa3a51cdc287be989fa1554866582deb1968fd04605270e14cbfd280f64211c043c5d8cb77a09e6a8cec6824ab15416ab94366aa73d2a3 SHA512 9f3e2afda4b8ac14aa64a1534e446eb6895ec7182ce5b7ded8008178e01139d383561a87f8c9fb5fe4b9c257ba5c6b93339955eb9e2f7417cd3f4832c35c4598

diff --git a/dev-python/m2crypto/files/m2crypto-libressl-version-check.patch b/dev-python/m2crypto/files/m2crypto-libressl-version-check.patch
deleted file mode 100644
index 770c49f4278..00000000000
--- a/dev-python/m2crypto/files/m2crypto-libressl-version-check.patch
+++ /dev/null
@@ -1,154 +0,0 @@
---- a/SWIG/_bio.i
-+++ b/SWIG/_bio.i
-@@ -63,14 +63,14 @@ extern BIO *BIO_pop(BIO *);
- static PyObject *_bio_err;
- 
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
- void pyfd_init(void);
- #endif
- 
- void bio_init(PyObject *bio_err) {
-     Py_INCREF(bio_err);
-     _bio_err = bio_err;
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-     pyfd_init();
- #endif
- }
-@@ -299,7 +299,7 @@ int bio_should_write(BIO* a) {
-     return BIO_should_write(a);
- }
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
- /* implment custom BIO_s_pyfd */
- 
- #ifdef WIN32
-
---- a/SWIG/_evp.i
-+++ b/SWIG/_evp.i
-@@ -19,7 +19,7 @@ Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved.
- #include <openssl/rsa.h>
- #include <openssl/opensslv.h>
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- HMAC_CTX *HMAC_CTX_new(void) {
-     HMAC_CTX *ret = PyMem_Malloc(sizeof(HMAC_CTX));
-
---- a/SWIG/_lib.i
-+++ b/SWIG/_lib.i
-@@ -18,7 +18,7 @@
- 
- %{
- /* OpenSSL 1.0.2 copmatbility shim */
--#if OPENSSL_VERSION_NUMBER < 0x10002000L
-+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
- typedef void (*OPENSSL_sk_freefunc)(void *);
- typedef void *(*OPENSSL_sk_copyfunc)(const void *);
- typedef struct stack_st OPENSSL_STACK;
-@@ -501,7 +501,7 @@ int passphrase_callback(char *buf, int num, int v, void *arg) {
- %inline %{
- 
- void lib_init() {
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-     SSLeay_add_all_algorithms();
-     ERR_load_ERR_strings();
- #endif
-
---- a/SWIG/_lib11_compat.i
-+++ b/SWIG/_lib11_compat.i
-@@ -8,7 +8,7 @@
-  */
- 
- %{
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- #include <string.h>
- #include <openssl/engine.h>
-
---- a/SWIG/_ssl.i
-+++ b/SWIG/_ssl.i
-@@ -268,7 +268,7 @@ void ssl_init(PyObject *ssl_err, PyObject *ssl_timeout_err) {
- 
- #ifndef OPENSSL_NO_SSL3
- const SSL_METHOD *sslv3_method(void) {
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-     PyErr_WarnEx(PyExc_DeprecationWarning,
-                  "Function SSLv3_method has been deprecated.", 1);
- #endif
-@@ -277,7 +277,7 @@ const SSL_METHOD *sslv3_method(void) {
- #endif
- 
- const SSL_METHOD *tlsv1_method(void) {
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-     PyErr_WarnEx(PyExc_DeprecationWarning,
-                  "Function TLSv1_method has been deprecated.", 1);
- #endif
-
---- a/SWIG/_threads.i
-+++ b/SWIG/_threads.i
-@@ -5,7 +5,7 @@
- #include <pythread.h>
- #include <openssl/crypto.h>
- 
--#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define CRYPTO_num_locks()      (CRYPTO_NUM_LOCKS)
- static PyThread_type_lock lock_cs[CRYPTO_num_locks()];
- static long lock_count[CRYPTO_num_locks()];
-@@ -13,7 +13,7 @@ static int thread_mode = 0;
- #endif
- 
- void threading_locking_callback(int mode, int type, const char *file, int line) {
--#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-         if (mode & CRYPTO_LOCK) {
-                 PyThread_acquire_lock(lock_cs[type], WAIT_LOCK);
-                 lock_count[type]++;
-@@ -25,7 +25,7 @@ void threading_locking_callback(int mode, int type, const char *file, int line)
- }
- 
- unsigned long threading_id_callback(void) {
--#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-     return (unsigned long)PyThread_get_thread_ident();
- #else
-     return (unsigned long)0;
-@@ -35,7 +35,7 @@ unsigned long threading_id_callback(void) {
- 
- %inline %{
- void threading_init(void) {
--#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-     int i;
-     if (!thread_mode) {
-         for (i=0; i<CRYPTO_num_locks(); i++) {
-@@ -50,7 +50,7 @@ void threading_init(void) {
- }
- 
- void threading_cleanup(void) {
--#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-     int i;
-     if (thread_mode) {
-         CRYPTO_set_locking_callback(NULL);
-
---- a/SWIG/libcrypto-compat.h
-+++ b/SWIG/libcrypto-compat.h
-@@ -1,7 +1,7 @@
- #ifndef LIBCRYPTO_COMPAT_H
- #define LIBCRYPTO_COMPAT_H
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- #include <openssl/rsa.h>
- #include <openssl/dsa.h>

diff --git a/dev-python/m2crypto/m2crypto-0.24.0.ebuild b/dev-python/m2crypto/m2crypto-0.24.0.ebuild
deleted file mode 100644
index 6fa7deaa9ba..00000000000
--- a/dev-python/m2crypto/m2crypto-0.24.0.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-MY_PN="M2Crypto"
-
-DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit"
-HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="libressl"
-
-RDEPEND="
-	!libressl? ( >=dev-libs/openssl-0.9.8:0= )
-	libressl? ( dev-libs/libressl:= )
-"
-DEPEND="${RDEPEND}
-	>=dev-lang/swig-1.3.28:0
-	dev-python/setuptools[${PYTHON_USEDEP}]
-"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-# Tests access network, and fail randomly. Bug #431458.
-RESTRICT=test
-
-python_test() {
-	esetup.py test
-}

diff --git a/dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild b/dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild
deleted file mode 100644
index 84bdf24cfb7..00000000000
--- a/dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-MY_PN="M2Crypto"
-
-DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit"
-HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-
-IUSE="libressl"
-
-RDEPEND="
-	!libressl? ( >=dev-libs/openssl-0.9.8:0=[-bindist(-)] )
-	libressl? ( dev-libs/libressl:0= )
-	virtual/python-typing[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	>=dev-lang/swig-1.3.28:0
-	dev-python/setuptools[${PYTHON_USEDEP}]
-"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-# Tests access network, and fail randomly. Bug #431458.
-RESTRICT=test
-
-PATCHES=(
-	"${FILESDIR}/${PN}-libressl-version-check.patch"
-)
-
-python_compile() {
-	# setup.py looks at platform.machine() to determine swig options.
-	# For exotic ABIs, we need to give swig a hint.
-	# https://bugs.gentoo.org/617946
-	# TODO: Fix cross-compiles
-	local -x SWIG_FEATURES=
-	case ${ABI} in
-		x32) SWIG_FEATURES="-D__ILP32__" ;;
-	esac
-	distutils-r1_python_compile --openssl="${EPREFIX}"/usr
-}
-
-python_test() {
-	esetup.py test
-}

diff --git a/dev-python/m2crypto/m2crypto-0.27.0.ebuild b/dev-python/m2crypto/m2crypto-0.27.0.ebuild
deleted file mode 100644
index e1df10b50d7..00000000000
--- a/dev-python/m2crypto/m2crypto-0.27.0.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-MY_PN="M2Crypto"
-
-DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit"
-HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-
-IUSE="libressl"
-
-RDEPEND="
-	!libressl? ( >=dev-libs/openssl-0.9.8:0=[-bindist(-)] )
-	libressl? ( dev-libs/libressl:0= )
-	virtual/python-typing[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	>=dev-lang/swig-1.3.28:0
-	dev-python/setuptools[${PYTHON_USEDEP}]
-"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-# Tests access network, and fail randomly. Bug #431458.
-RESTRICT=test
-
-python_compile() {
-	# setup.py looks at platform.machine() to determine swig options.
-	# For exotic ABIs, we need to give swig a hint.
-	# https://bugs.gentoo.org/617946
-	# TODO: Fix cross-compiles
-	local -x SWIG_FEATURES=
-	case ${ABI} in
-		x32) SWIG_FEATURES="-D__ILP32__" ;;
-	esac
-	distutils-r1_python_compile --openssl="${EPREFIX}"/usr
-}
-
-python_test() {
-	esetup.py test
-}

diff --git a/dev-python/m2crypto/m2crypto-0.31.0-r1.ebuild b/dev-python/m2crypto/m2crypto-0.31.0-r1.ebuild
deleted file mode 100644
index a3aab5c0c9a..00000000000
--- a/dev-python/m2crypto/m2crypto-0.31.0-r1.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2018-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 python3_{5..7})
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-MY_PN="M2Crypto"
-
-DESCRIPTION="A Python crypto and SSL toolkit"
-HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-
-IUSE="libressl"
-
-RDEPEND="
-	!libressl? ( dev-libs/openssl:0=[-bindist(-)] )
-	libressl? ( dev-libs/libressl:0= )
-	virtual/python-typing[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	>=dev-lang/swig-2.0.9
-	dev-python/setuptools[${PYTHON_USEDEP}]
-"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-# Tests access network, and fail randomly. Bug #431458.
-RESTRICT=test
-
-PATCHES=(
-	"${FILESDIR}/${PN}-libressl-${PV}.patch"
-)
-
-python_compile() {
-	# setup.py looks at platform.machine() to determine swig options.
-	# For exotic ABIs, we need to give swig a hint.
-	# https://bugs.gentoo.org/617946
-	# TODO: Fix cross-compiles
-	local -x SWIG_FEATURES=
-	case ${ABI} in
-		x32) SWIG_FEATURES="-D__ILP32__" ;;
-	esac
-	distutils-r1_python_compile --openssl="${EPREFIX}"/usr
-}
-
-python_test() {
-	esetup.py test
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/
@ 2021-06-13 13:14 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2021-06-13 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     75de7f050246aaad0bf29cd909fc729b7d8fe417
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 13 13:13:31 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 13 13:14:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75de7f05

dev-python/m2crypto: Enable py3.10

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../m2crypto/files/m2crypto-0.37.1-py310.patch     | 119 +++++++++++++++++++++
 dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild      |   3 +-
 2 files changed, 121 insertions(+), 1 deletion(-)

diff --git a/dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch b/dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch
new file mode 100644
index 00000000000..f9be349fc3d
--- /dev/null
+++ b/dev-python/m2crypto/files/m2crypto-0.37.1-py310.patch
@@ -0,0 +1,119 @@
+diff --git a/SWIG/_bio.i b/SWIG/_bio.i
+index 84b76b3..6c090a4 100644
+--- a/SWIG/_bio.i
++++ b/SWIG/_bio.i
+@@ -246,8 +246,8 @@ PyObject *bio_set_cipher(BIO *b, EVP_CIPHER *c, PyObject *key, PyObject *iv, int
+     const void *kbuf, *ibuf;
+     Py_ssize_t klen, ilen;
+ 
+-    if ((PyObject_AsReadBuffer(key, &kbuf, &klen) == -1)
+-        || (PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1))
++    if ((m2_PyObject_AsReadBuffer(key, &kbuf, &klen) == -1)
++        || (m2_PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1))
+         return NULL;
+ 
+     BIO_set_cipher(b, (const EVP_CIPHER *)c,
+diff --git a/SWIG/_ec.i b/SWIG/_ec.i
+index f47d593..a492f6f 100644
+--- a/SWIG/_ec.i
++++ b/SWIG/_ec.i
+@@ -466,7 +466,7 @@ EC_KEY* ec_key_from_pubkey_der(PyObject *pubkey) {
+     const unsigned char *tempBuf;
+     EC_KEY *keypair;
+ 
+-    if (PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
++    if (m2_PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
+     {
+         return NULL;
+     }
+@@ -486,7 +486,7 @@ EC_KEY* ec_key_from_pubkey_params(int nid, PyObject *pubkey) {
+     const unsigned char *tempBuf;
+     EC_KEY *keypair;
+ 
+-    if (PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
++    if (m2_PyObject_AsReadBuffer(pubkey, &keypairbuf, &keypairbuflen) == -1)
+     {
+         return NULL;
+     }
+diff --git a/SWIG/_lib.i b/SWIG/_lib.i
+index 954e99b..351134b 100644
+--- a/SWIG/_lib.i
++++ b/SWIG/_lib.i
+@@ -137,8 +137,8 @@ m2_PyObject_AsReadBuffer(PyObject * obj, const void **buffer,
+ 	    len = view.len;
+ 	}
+     } else {
+-	if ((ret = PyObject_AsReadBuffer(obj, buffer, &len)) != 0)
+-	    return ret;
++    PyErr_SetString(PyExc_TypeError, "expected a readable buffer object");
++	return -1;
+     }
+     if (len > INT_MAX) {
+ 	m2_PyBuffer_Release(obj, &view);
+@@ -171,11 +171,8 @@ static int m2_PyObject_GetBufferInt(PyObject *obj, Py_buffer *view, int flags)
+     if (PyObject_CheckBuffer(obj))
+         ret = PyObject_GetBuffer(obj, view, flags);
+     else {
+-        const void *buf;
+-
+-        ret = PyObject_AsReadBuffer(obj, &buf, &view->len);
+-        if (ret == 0)
+-            view->buf = (void *)buf;
++        PyErr_SetString(PyExc_TypeError, "expected a readable buffer object");
++        return -1;
+     }
+     if (ret)
+         return ret;
+@@ -633,7 +630,7 @@ BIGNUM *hex_to_bn(PyObject *value) {
+         }
+     }
+     else {
+-        if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
++        if (m2_PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
+             return NULL;
+     }
+ 
+@@ -665,7 +662,7 @@ BIGNUM *dec_to_bn(PyObject *value) {
+         }
+     }
+     else {
+-        if (PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
++        if (m2_PyObject_AsReadBuffer(value, &vbuf, &vlen) == -1)
+             return NULL;
+     }
+ 
+diff --git a/SWIG/_rc4.i b/SWIG/_rc4.i
+index eb4747e..6af2dc6 100644
+--- a/SWIG/_rc4.i
++++ b/SWIG/_rc4.i
+@@ -46,7 +46,7 @@ PyObject *rc4_update(RC4_KEY *key, PyObject *in) {
+     Py_ssize_t len;
+     void *out;
+ 
+-    if (PyObject_AsReadBuffer(in, &buf, &len) == -1)
++    if (m2_PyObject_AsReadBuffer(in, &buf, &len) == -1)
+         return NULL;
+ 
+     if (!(out = PyMem_Malloc(len))) {
+diff --git a/SWIG/_util.i b/SWIG/_util.i
+index bc2ee61..18e446a 100644
+--- a/SWIG/_util.i
++++ b/SWIG/_util.i
+@@ -22,7 +22,7 @@ PyObject *util_hex_to_string(PyObject *blob) {
+     char *ret;
+     Py_ssize_t len;
+ 
+-    if (PyObject_AsReadBuffer(blob, &buf, &len) == -1)
++    if (m2_PyObject_AsReadBuffer(blob, &buf, &len) == -1)
+         return NULL;
+ 
+     ret = hex_to_string((unsigned char *)buf, len);
+@@ -44,7 +44,7 @@ PyObject *util_string_to_hex(PyObject *blob) {
+     Py_ssize_t len0;
+     long len;
+ 
+-    if (PyObject_AsReadBuffer(blob, &buf, &len0) == -1)
++    if (m2_PyObject_AsReadBuffer(blob, &buf, &len0) == -1)
+         return NULL;
+ 
+     len = len0;

diff --git a/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild b/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild
index b6c17695032..86a23528664 100644
--- a/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild
+++ b/dev-python/m2crypto/m2crypto-0.37.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1 toolchain-funcs
@@ -31,6 +31,7 @@ DEPEND="${RDEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/${P}-openssl-fixes.patch"
+	"${FILESDIR}/${P}-py310.patch"
 )
 
 swig_define() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-13 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 13:44 [gentoo-commits] repo/gentoo:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-06-13 13:14 Michał Górny
2019-04-18 15:11 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox