diff --git a/pycurl-7.19.5.1-tls12.patch b/pycurl-7.19.5.1-tls12.patch deleted file mode 100644 index 7dd2169..0000000 --- a/pycurl-7.19.5.1-tls12.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 74f8a046fbb85b07f82357679c397f28ff6f839a Mon Sep 17 00:00:00 2001 -From: Oleg Pudeyev -Date: Tue, 19 May 2015 11:41:27 -0400 -Subject: [PATCH] Add libcurl 7.34.0 sslversion options - -Upstream-commit: 83ccaa22e824b1bd9d2c60cab10dff323c7d0ca4 -Signed-off-by: Kamil Dudka ---- - src/module.c | 7 ++++++- - tests/option_constants_test.py | 16 ++++++++++++++++ - 2 files changed, 22 insertions(+), 1 deletion(-) - -diff --git a/src/module.c b/src/module.c -index d7c776f..e5f23f2 100644 ---- a/src/module.c -+++ b/src/module.c -@@ -789,9 +789,14 @@ initpycurl(void) - - /* constants for setopt(SSLVERSION, x) */ - insint_c(d, "SSLVERSION_DEFAULT", CURL_SSLVERSION_DEFAULT); -- insint_c(d, "SSLVERSION_TLSv1", CURL_SSLVERSION_TLSv1); - insint_c(d, "SSLVERSION_SSLv2", CURL_SSLVERSION_SSLv2); - insint_c(d, "SSLVERSION_SSLv3", CURL_SSLVERSION_SSLv3); -+ insint_c(d, "SSLVERSION_TLSv1", CURL_SSLVERSION_TLSv1); -+#if LIBCURL_VERSION_NUM >= 0x072200 /* check for 7.34.0 or greater */ -+ insint_c(d, "SSLVERSION_TLSv1_0", CURL_SSLVERSION_TLSv1_0); -+ insint_c(d, "SSLVERSION_TLSv1_1", CURL_SSLVERSION_TLSv1_1); -+ insint_c(d, "SSLVERSION_TLSv1_2", CURL_SSLVERSION_TLSv1_2); -+#endif - - /* curl_TimeCond: constants for setopt(TIMECONDITION, x) */ - insint_c(d, "TIMECONDITION_NONE", CURL_TIMECOND_NONE); -diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py -index cdba4a5..26557b2 100644 ---- a/tests/option_constants_test.py -+++ b/tests/option_constants_test.py -@@ -147,3 +147,19 @@ class OptionConstantsTest(unittest.TestCase): - curl = pycurl.Curl() - curl.setopt(curl.MAIL_AUTH, 'hello@world.com') - curl.close() -+ -+ def test_sslversion_options(self): -+ curl = pycurl.Curl() -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_DEFAULT) -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_SSLv2) -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_SSLv3) -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_TLSv1) -+ curl.close() -+ -+ @util.min_libcurl(7, 34, 0) -+ def test_sslversion_7_34_0(self): -+ curl = pycurl.Curl() -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_TLSv1_0) -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_TLSv1_1) -+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_TLSv1_2) -+ curl.close() --- -2.4.6 - diff --git a/pycurl-7.19.5.2-run-tests.patch b/pycurl-7.19.5.2-run-tests.patch new file mode 100644 index 0000000..1c899bc --- /dev/null +++ b/pycurl-7.19.5.2-run-tests.patch @@ -0,0 +1,41 @@ +From ece0018e96b92a7eedd1fcea62212ec36ffb5d37 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 2 Nov 2015 16:29:16 +0100 +Subject: [PATCH] tests/run.sh: allow to override $PYTHON and $NOSETESTS + +... needed for building Fedora packages where both Python 2 and Python 3 +modules need to be built on the same system. +--- + tests/run.sh | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/tests/run.sh b/tests/run.sh +index 7bb9cd0..ca8138a 100755 +--- a/tests/run.sh ++++ b/tests/run.sh +@@ -3,8 +3,11 @@ + set -e + set -x + ++test -n "$PYTHON" || PYTHON=python ++test -n "$NOSETESTS" || NOSETESTS=nosetests ++ + mkdir -p tests/tmp +-export PYTHONSUFFIX=$(python -V 2>&1 |awk '{print $2}' |awk -F. '{print $1 "." $2}') ++export PYTHONSUFFIX=$($PYTHON -V 2>&1 |awk '{print $2}' |awk -F. '{print $1 "." $2}') + export PYTHONPATH=$(ls -d build/lib.*$PYTHONSUFFIX):$PYTHONPATH + + extra_attrs= +@@ -16,6 +19,6 @@ if test "$CI" = true; then + fi + fi + +-python -c 'import pycurl; print(pycurl.version)' +-nosetests -a \!standalone"$extra_attrs" --with-flaky "$@" +-nosetests -a standalone --with-flaky "$@" ++$PYTHON -c 'import pycurl; print(pycurl.version)' ++$NOSETESTS -a \!standalone"$extra_attrs" "$@" ++$NOSETESTS -a standalone "$@" +-- +2.5.2 + diff --git a/python-pycurl.spec b/python-pycurl.spec index 8478bff..39b170e 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -2,8 +2,8 @@ %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-pycurl -Version: 7.19.5.1 -Release: 3%{?dist} +Version: 7.19.5.2 +Release: 1%{?dist} Summary: A Python interface to libcurl Group: Development/Languages @@ -11,20 +11,22 @@ License: LGPLv2+ or MIT URL: http://pycurl.sourceforge.net/ Source0: http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz -# introduce CURL_SSLVERSION_TLSv1_[0-2] (#1260408) -Patch1: pycurl-7.19.5.1-tls12.patch +# make tests work: http://curl.haxx.se/mail/curlpython-2015-11/0003.html +Patch1: pycurl-7.19.5.2-run-tests.patch Requires: keyutils-libs BuildRequires: python-devel BuildRequires: python3-devel BuildRequires: curl-devel >= 7.19.0 BuildRequires: openssl-devel +BuildRequires: pyflakes BuildRequires: python-bottle BuildRequires: python-cherrypy BuildRequires: python-nose BuildRequires: python3-bottle BuildRequires: python3-cherrypy BuildRequires: python3-nose +BuildRequires: python3-pyflakes BuildRequires: vsftpd # During its initialization, PycURL checks that the actual libcurl version @@ -61,6 +63,9 @@ of features. # temporarily exclude failing test-cases rm -f tests/{post_test,reset_test}.py +# remove tests depending on the 'flaky' nose plug-in (not available in Fedora) +grep '^import flaky' -r tests | cut -d: -f1 | xargs rm -fv + # copy the whole directory for the python3 build rm -rf %{py3dir} cp -a . %{py3dir} @@ -101,6 +106,9 @@ rm -rf %{buildroot}%{_datadir}/doc/pycurl %{python3_sitearch}/* %changelog +* Mon Nov 02 2015 Kamil Dudka - 7.19.5.2-1 +- update to 7.19.5.2 + * Mon Sep 07 2015 Kamil Dudka - 7.19.5.1-3 - introduce CURL_SSLVERSION_TLSv1_[0-2] (#1260408) diff --git a/sources b/sources index 76334d8..72d2014 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f44cd54256d7a643ab7b16e3f409b26b pycurl-7.19.5.1.tar.gz +59cea96cc3027a1a7ed5020e69d4009a pycurl-7.19.5.2.tar.gz