diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/pycurl | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/pycurl')
| -rw-r--r-- | dev-python/pycurl/Manifest | 2 | ||||
| -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/metadata.xml | 23 | ||||
| -rw-r--r-- | dev-python/pycurl/pycurl-7.43.0.3.ebuild | 76 | ||||
| -rw-r--r-- | dev-python/pycurl/pycurl-7.43.0.5.ebuild | 89 |
6 files changed, 274 insertions, 0 deletions
diff --git a/dev-python/pycurl/Manifest b/dev-python/pycurl/Manifest new file mode 100644 index 000000000000..de2fe92ff10b --- /dev/null +++ b/dev-python/pycurl/Manifest @@ -0,0 +1,2 @@ +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 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/metadata.xml b/dev-python/pycurl/metadata.xml new file mode 100644 index 000000000000..0be2c1ca9435 --- /dev/null +++ b/dev-python/pycurl/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <longdescription> +PycURL is a Python interface to libcurl. PycURL can be used to fetch +objects identified by a URL from a Python program, similar to the urllib +Python module. All the functionality provided by libcurl can used through +the pycurl interface. + </longdescription> + <longdescription lang="ja"> +PycURLはLibcurlへのパイソン・インターフェイスです。PycURLはPython言語モジュールの様に、Python言語プログラムからURLで指定されたオブジェクトをダウンロードするにも使えます。Libcurlで利用できる機能全てはPycURLインターフェイスを通して利用できます。 + </longdescription> + <upstream> + <remote-id type="github">pycurl/pycurl</remote-id> + <remote-id type="sourceforge">pycurl</remote-id> + <remote-id type="pypi">pycurl</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-python/pycurl/pycurl-7.43.0.3.ebuild b/dev-python/pycurl/pycurl-7.43.0.3.ebuild new file mode 100644 index 000000000000..20694a2260f7 --- /dev/null +++ b/dev-python/pycurl/pycurl-7.43.0.3.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# The selftests fail with pypy, and urlgrabber segfaults for me. +PYTHON_COMPAT=( python2_7 python3_{6,7} ) + +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}] + 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 + +python_prepare_all() { + sed -e "/setup_args\['data_files'\] = /d" -i setup.py || 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() { + nosetests -a '!standalone,!gssapi' -v --with-flaky || die "Tests fail with ${EPYTHON}" + nosetests -a 'standalone' -v --with-flaky || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local HTML_DOCS=( doc/. ) + use examples && dodoc -r examples + distutils-r1_python_install_all +} diff --git a/dev-python/pycurl/pycurl-7.43.0.5.ebuild b/dev-python/pycurl/pycurl-7.43.0.5.ebuild new file mode 100644 index 000000000000..046812098a77 --- /dev/null +++ b/dev-python/pycurl/pycurl-7.43.0.5.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# The selftests fail with pypy, and urlgrabber segfaults for me. +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} ) + +inherit distutils-r1 toolchain-funcs + +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}] + 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}] + )" + +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 + # these tests are broken with newer versions of bottle + sed -e 's:test.*_invalid_utf8:_&:' -i tests/getinfo_test.py || 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} +} + +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 +} + +python_test() { + nosetests -a '!standalone,!gssapi' -v --with-flaky || die "Tests fail with ${EPYTHON}" + nosetests -a 'standalone' -v --with-flaky || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local HTML_DOCS=( doc/. ) + use examples && dodoc -r examples + distutils-r1_python_install_all +} |
