diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-17 14:32:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-17 14:32:10 +0100 |
commit | 51c50bd4c895ebf56d81fecae8e45ec3b5fc3efa (patch) | |
tree | 753b6b08624c34d1ed8414bbe22c45409f7741b9 /dev-python/pycurl | |
parent | be9d77d3ac6af8f4ead98d89706f356b65578c93 (diff) | |
parent | deba8115d2c2af26df42966b91ef04ff4dd79cde (diff) |
Merge branch 'edge' into next
Diffstat (limited to 'dev-python/pycurl')
-rw-r--r-- | dev-python/pycurl/Manifest | 6 | ||||
-rw-r--r-- | dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch | 34 | ||||
-rw-r--r-- | dev-python/pycurl/files/pycurl-7.43.0.5-telnet-test.patch | 50 | ||||
-rw-r--r-- | dev-python/pycurl/pycurl-7.43.0.5.ebuild | 19 | ||||
-rw-r--r-- | dev-python/pycurl/pycurl-7.43.0.ebuild | 81 |
5 files changed, 102 insertions, 88 deletions
diff --git a/dev-python/pycurl/Manifest b/dev-python/pycurl/Manifest index b8d8a2da45c3..04d2407c69c4 100644 --- a/dev-python/pycurl/Manifest +++ b/dev-python/pycurl/Manifest @@ -1,7 +1,7 @@ +AUX pycurl-7.43.0.5-cc-cflags.patch 1145 BLAKE2B c67a94b7ee13c784d8ddd3870e00e5b0963228a0ce0080b6dae0b0919ff5cdf17b2c51112586e9e7ff1731862cb40a040edd158f551d4278a286b2af7895641d SHA512 b082f1987ffe6cd61b17fed260dd039acad446b597eb43d060cc9115c36fe38e0b1e61e69e81d725061f589c2f9aae76a4bf68f07c68bebd99d4b5c2cbe9d530 +AUX pycurl-7.43.0.5-telnet-test.patch 1561 BLAKE2B 640203da8a9b6a13cb5fce187c6699127d8492f0e5ab3a9b8d540b458416a095b474cc84e7ed2068a15e20860e5f7becfe42f010747a8c2a5fa551300e4082db SHA512 58046c87e42ea6f86ee3b23f541e616b33be5f09ee5a2d3d1fd6bce717f59dc52a56a3cd5dc3aaebc9aa5948e4dcad91c1841bf1e1b66f31e66f04d095820cef DIST pycurl-7.43.0.3.tar.gz 215003 BLAKE2B 2f1e61bd52873906a2d0480ab316c9026f2722cde14c059884ee552a2340fe6b646b4021326f72730aa9eed82f57b5ba923d19c2b8dfadb7a8f8819982116e7a SHA512 eec5c5f10b9a78bcf7e786368cdd5dc165faa4bb646df39ad52c1dfe8110e3e56456f5961f63ab7b460e51e56c41e66a0fc4652c8132411f1dee4074b3cffc00 DIST pycurl-7.43.0.5.tar.gz 216877 BLAKE2B 57605fa3426a76e0cdcc1bb4f247985a27439d67d32769945332f94c49eead7fadb2847accf98f0d0994e461fc9d6fd100a181ff6d3ac0765dad31d546a75ff4 SHA512 835ed6cca25d2dd3e7084f905f3b0b082d4af04761fa9d4dc4714865863a97c095c08e6f55ada91b9f60ccad7838328a82fb2add8108aea12056200cf1f12845 -DIST pycurl-7.43.0.tar.gz 182522 BLAKE2B af6c85934565d851ea2280253ec6c61ab85f2dea047c83fc5ad65a6f05d3b8bf97932a161ae171c573a7333a99f2a25d4280c70be7ed3aef5eae19b5c392f5c7 SHA512 7442462c74c19964b9d72976e9b92bf68bb37debc1401bc399590bea42704065da13d6de710e795eeae79a4651b9a08841d50454243cb0994c7eb1c1bab233a5 EBUILD pycurl-7.43.0.3.ebuild 2671 BLAKE2B fd73be6647ac15afe8e6770c6cdd47d835b2efce1abc02895aebe2a29c70d6791589557056f493d79510d2c531e745521fef7ab69f552008110646232eb7ccaf SHA512 7b51cee2882727f5a4dd9e15f1e14f598d9c00be43b5b2d567cf9d556137ffcbbc1a8ee5efa6d4311983a906fb41e2c043a5f01dcb50c050c2ea3a6c56988bc3 -EBUILD pycurl-7.43.0.5.ebuild 2682 BLAKE2B 8a25ff0492292c77d8d367d85a5c047708ec968ddbb9f80f365cc05c71918387f4620f852ddaee8febd3230e15acf7c08ee8b5983e91189035e17ad9ea658354 SHA512 2f1bd2af432ad24bd4860ff71c7fcf60a7dd514e035bb76dc04d5f9afeea2df4af168651cccaaed991533b08ba640dacb4cc7303c87f945586b56819162c0664 -EBUILD pycurl-7.43.0.ebuild 2671 BLAKE2B dfd7855ea16196ba05ac6c335968217b20d1cb44fb7c2097bf36ad66979321bb66552dfb4975dfd17fe916a7c6c32494030266fd222a2c383333d955e8b37ed4 SHA512 d665cb761e5792155cb68e5f218d3840d665f9cae7dd21ef56cddeffc367ba3ad1d9376009a7d751612018095f8ecf6de4844e57c10ac067abb7fd5cbaffe518 +EBUILD pycurl-7.43.0.5.ebuild 2892 BLAKE2B 2a432aa5fcf94f4e1358e197cfe77845a8bea35939dfabc7319a9bef1a9ad439b2803e4644eb84fe74c2ebd7ea954a927fd44e7f913467994c95105d0536f0ed SHA512 cbb15e5262dc855fa08345cdccb215ded2ed3ca46d3fb23d8fb2c34088be627d1d2c73271e39d3fc5bcdae64af8450ccba0b51640dcc178958395eb3c7bb81b2 MISC metadata.xml 1099 BLAKE2B d96159920135d8d85a01449423d1638889d2c6ed9f84d08eabd7405a3271efe85315cece0fc4f6832bd43b622089c819df3d20fd725150c89a0910ec26ac339a SHA512 8f8b3a10d2f72aa67d1b5f7462ea62803d9150cab3d96792adbd65b379a45c074d68809b25d4a2b558bf28dae72e095c598bd0485fce4c5dafba0784de517a6c diff --git a/dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch b/dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch new file mode 100644 index 000000000000..b1e66e0942d1 --- /dev/null +++ b/dev-python/pycurl/files/pycurl-7.43.0.5-cc-cflags.patch @@ -0,0 +1,34 @@ +From 861ba3143001caf2623ce5d84a1d04a69b502339 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 11 May 2020 08:52:04 +0200 +Subject: [PATCH 1/2] Support overriding CC, respect *FLAGS in fake-curl + +The shipped libraries (obviously) do not work on non-amd64 platforms, +and rebuilding without the correct compiler and flags does not work +on more complex setups such as ppc64 with 32-bit userland. Make +the Makefile permit CC override while preserving the current default, +and use user-provided CFLAGS, CPPFLAGS and LDFLAGS. +--- + tests/fake-curl/libcurl/Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/fake-curl/libcurl/Makefile b/tests/fake-curl/libcurl/Makefile +index b05bc89..8ece206 100644 +--- a/tests/fake-curl/libcurl/Makefile ++++ b/tests/fake-curl/libcurl/Makefile +@@ -7,8 +7,11 @@ all: \ + + .SUFFIXES: .c .so + ++CC = `curl-config --cc` ++CFLAGS += `curl-config --cflags` ++ + .c.so: +- `curl-config --cc` `curl-config --cflags` -shared -fPIC \ ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC \ + -Wl,-soname,$@ -o $@ $< + + show-targets: +-- +2.26.2 + diff --git a/dev-python/pycurl/files/pycurl-7.43.0.5-telnet-test.patch b/dev-python/pycurl/files/pycurl-7.43.0.5-telnet-test.patch new file mode 100644 index 000000000000..c96b14d7c475 --- /dev/null +++ b/dev-python/pycurl/files/pycurl-7.43.0.5-telnet-test.patch @@ -0,0 +1,50 @@ +From 1f747cc4194601e8e54084638085d60026f1dbc4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 4 May 2020 10:22:32 +0200 +Subject: [PATCH] Skip telnet tests when cURL is built without telnet support + +--- + tests/option_constants_test.py | 1 + + tests/util.py | 14 ++++++++++++++ + 2 files changed, 15 insertions(+) + +diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py +index 2d6d185..20228c6 100644 +--- a/tests/option_constants_test.py ++++ b/tests/option_constants_test.py +@@ -387,6 +387,7 @@ class OptionConstantsSettingTest(unittest.TestCase): + def test_keypasswd(self): + self.curl.setopt(self.curl.KEYPASSWD, 'secret') + ++ @util.only_telnet + def test_telnetoptions(self): + self.curl.setopt(self.curl.TELNETOPTIONS, ('TTYPE=1', 'XDISPLOC=2')) + +diff --git a/tests/util.py b/tests/util.py +index aabadf5..e12e251 100644 +--- a/tests/util.py ++++ b/tests/util.py +@@ -138,6 +138,20 @@ def only_ssl(fn): + + return decorated + ++def only_telnet(fn): ++ import nose.plugins.skip ++ import pycurl ++ ++ @functools.wraps(fn) ++ def decorated(*args, **kwargs): ++ # pycurl.version_info()[8] is a tuple of protocols supported by libcurl ++ if 'telnet' not in pycurl.version_info()[8]: ++ raise nose.plugins.skip.SkipTest('libcurl does not support telnet') ++ ++ return fn(*args, **kwargs) ++ ++ return decorated ++ + def only_ssl_backends(*backends): + def decorator(fn): + import nose.plugins.skip +-- +2.26.2 + diff --git a/dev-python/pycurl/pycurl-7.43.0.5.ebuild b/dev-python/pycurl/pycurl-7.43.0.5.ebuild index 83c007551994..0bdbcb60e901 100644 --- a/dev-python/pycurl/pycurl-7.43.0.5.ebuild +++ b/dev-python/pycurl/pycurl-7.43.0.5.ebuild @@ -6,7 +6,7 @@ EAPI=7 # The selftests fail with pypy, and urlgrabber segfaults for me. PYTHON_COMPAT=( python2_7 python3_{6,7,8} ) -inherit distutils-r1 +inherit distutils-r1 toolchain-funcs DESCRIPTION="python binding for curl/libcurl" HOMEPAGE=" @@ -17,7 +17,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="curl_ssl_gnutls curl_ssl_libressl curl_ssl_nss +curl_ssl_openssl examples ssl test" RESTRICT="!test? ( test )" @@ -46,8 +46,11 @@ DEPEND="${RDEPEND} net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_libressl(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-),http2] >=dev-python/bottle-0.12.7[${PYTHON_USEDEP}] )" -# Needed for individual runs of testsuite by python impls. -DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/pycurl-7.43.0.5-telnet-test.patch + "${FILESDIR}"/pycurl-7.43.0.5-cc-cflags.patch +) python_prepare_all() { sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die @@ -59,6 +62,14 @@ python_configure_all() { export PYCURL_SSL_LIBRARY=${CURL_SSL/libressl/openssl} } +src_test() { + # upstream bundles precompiled amd64 libs + rm tests/fake-curl/libcurl/*.so || die + emake -C tests/fake-curl/libcurl CC="$(tc-getCC)" + + distutils-r1_src_test +} + python_compile() { python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" distutils-r1_python_compile diff --git a/dev-python/pycurl/pycurl-7.43.0.ebuild b/dev-python/pycurl/pycurl-7.43.0.ebuild deleted file mode 100644 index 097d0f8347b0..000000000000 --- a/dev-python/pycurl/pycurl-7.43.0.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -# The selftests fail with pypy, and urlgrabber segfaults for me. -PYTHON_COMPAT=( python2_7 python3_6 ) - -inherit distutils-r1 - -DESCRIPTION="python binding for curl/libcurl" -HOMEPAGE=" - https://github.com/pycurl/pycurl - https://pypi.org/project/pycurl/ - http://pycurl.io/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="curl_ssl_gnutls curl_ssl_libressl curl_ssl_nss +curl_ssl_openssl examples ssl test" -RESTRICT="!test? ( test )" - -# Depend on a curl with curl_ssl_* USE flags. -# libcurl must not be using an ssl backend we do not support. -# If the libcurl ssl backend changes pycurl should be recompiled. -# If curl uses gnutls, depend on at least gnutls 2.11.0 so that pycurl -# does not need to initialize gcrypt threading and we do not need to -# explicitly link to libgcrypt. -RDEPEND=" - >=net-misc/curl-7.25.0-r1:=[ssl=] - ssl? ( - net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_libressl(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-)] - curl_ssl_gnutls? ( >=net-libs/gnutls-2.11.0:= ) - curl_ssl_libressl? ( dev-libs/libressl:= ) - curl_ssl_openssl? ( dev-libs/openssl:= ) - )" - -# bottle-0.12.7: https://github.com/pycurl/pycurl/issues/180 -# bottle-0.12.7: https://github.com/defnull/bottle/commit/f35197e2a18de1672831a70a163fcfd38327a802 -DEPEND="${RDEPEND} - test? ( - dev-python/bottle[${PYTHON_USEDEP}] - dev-python/flaky[${PYTHON_USEDEP}] - dev-python/nose[${PYTHON_USEDEP}] - dev-python/nose-show-skipped[${PYTHON_USEDEP}] - net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_libressl(-)=,curl_ssl_nss(-)=,curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-),kerberos] - >=dev-python/bottle-0.12.7[${PYTHON_USEDEP}] - )" -# Needed for individual runs of testsuite by python impls. -DISTUTILS_IN_SOURCE_BUILD=1 - -python_prepare_all() { - sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die - sed -e '/pyflakes/d' -i Makefile || die - distutils-r1_python_prepare_all -} - -python_configure_all() { - # Override faulty detection in setup.py, bug 510974. - export PYCURL_SSL_LIBRARY=${CURL_SSL/libressl/openssl} -} - -python_compile() { - python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" - distutils-r1_python_compile -} - -python_test() { - emake -j1 do-test -} - -python_install_all() { - local HTML_DOCS=( doc/. ) - if use examples; then - dodoc -r examples - docompress -x /usr/share/doc/${PF}/examples - fi - - distutils-r1_python_install_all -} |