2011-09-20 12:05:30 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pycurl
|
|
|
|
#
|
2020-03-03 13:10:06 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2011-09-20 12:05:30 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-11-04 11:07:50 +00:00
|
|
|
|
2018-11-04 09:35:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-20 12:05:30 +00:00
|
|
|
#
|
|
|
|
|
2012-05-02 14:06:38 +00:00
|
|
|
|
2020-12-15 13:45:12 +00:00
|
|
|
%define oldpython python
|
2017-04-06 15:49:32 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-09-10 21:28:39 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
2019-04-08 13:37:38 +00:00
|
|
|
%define psuffix -test
|
2018-09-10 21:28:39 +00:00
|
|
|
%bcond_without test
|
|
|
|
%else
|
2019-04-08 13:37:38 +00:00
|
|
|
%define psuffix %{nil}
|
2018-09-10 21:28:39 +00:00
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2019-04-08 13:37:38 +00:00
|
|
|
Name: python-pycurl%{psuffix}
|
2020-03-03 13:10:06 +00:00
|
|
|
Version: 7.43.0.5
|
2011-09-20 12:05:30 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: PycURL -- cURL library module
|
2018-07-10 11:11:33 +00:00
|
|
|
License: LGPL-2.1-or-later AND MIT
|
2019-03-12 10:30:55 +00:00
|
|
|
URL: http://pycurl.io/
|
2017-04-06 15:49:32 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz
|
2017-06-21 13:51:57 +00:00
|
|
|
# PATCH-FIX-OPENSUSE increase_test_timeout.diff -- Increase the timeout in a test so it doesn't fail when obs is overloaded
|
2017-12-09 12:42:07 +00:00
|
|
|
Patch0: increase_test_timeout.diff
|
2018-01-30 17:25:48 +00:00
|
|
|
# PATCH-FIX-UPSTREAM handle difference between libssh and libssh2
|
|
|
|
Patch1: pycurl-libssh.patch
|
2018-08-30 12:36:56 +00:00
|
|
|
# PATCH-FIX-OPENSUSE python-pycurl-7.43.0-tls-backend.patch -- do not run runtime tests to compare linked libs
|
|
|
|
Patch2: python-pycurl-7.43.0-tls-backend.patch
|
2018-11-04 09:35:53 +00:00
|
|
|
Patch3: disable_randomly_failing_tests.patch
|
2020-12-15 11:17:18 +00:00
|
|
|
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#pycurl/pycurl#655 mcepl@suse.com
|
|
|
|
# remove dependency on nose
|
|
|
|
Patch4: remove_nose.patch
|
2020-12-15 13:45:12 +00:00
|
|
|
# PATCH-FIX-OPENSUSE make-leap15-compat.patch mcepl@suse.com
|
2020-12-15 12:57:04 +00:00
|
|
|
# Make tests passing with Leap 15.2
|
|
|
|
Patch5: make-py2-compat.patch
|
2018-12-07 00:15:19 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2018-12-06 23:38:17 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-07-10 11:11:33 +00:00
|
|
|
BuildRequires: fdupes
|
2019-07-23 10:28:57 +00:00
|
|
|
BuildRequires: pkgconfig
|
2017-04-06 15:49:32 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-07-23 10:28:57 +00:00
|
|
|
BuildRequires: pkgconfig(libcurl) >= 7.19.0
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
2018-09-10 21:28:39 +00:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module bottle}
|
|
|
|
BuildRequires: %{python_module flaky}
|
2020-12-15 11:17:18 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-09-10 21:28:39 +00:00
|
|
|
%endif
|
2020-12-15 13:45:12 +00:00
|
|
|
%ifpython2
|
|
|
|
Provides: %{oldpython}-curl = %{version}
|
|
|
|
Obsoletes: %{oldpython}-curl < %{version}
|
|
|
|
%endif
|
2017-04-06 15:49:32 +00:00
|
|
|
%python_subpackages
|
2011-09-20 12:05:30 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This module provides bindings for the cURL library.
|
|
|
|
|
2017-04-06 15:49:32 +00:00
|
|
|
%package -n %{name}-doc
|
2011-09-20 12:05:30 +00:00
|
|
|
Summary: Documentation for python-curl
|
2017-04-06 15:49:32 +00:00
|
|
|
Provides: %{python_module pycurl-doc = %{version}}
|
|
|
|
BuildArch: noarch
|
2011-09-20 12:05:30 +00:00
|
|
|
|
2017-04-06 15:49:32 +00:00
|
|
|
%description -n %{name}-doc
|
2011-09-20 12:05:30 +00:00
|
|
|
This module provides bindings for the cURL library.
|
|
|
|
|
|
|
|
This package contains documentation and examples.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pycurl-%{version}
|
2018-08-30 12:36:56 +00:00
|
|
|
%autopatch -p1
|
2014-05-20 14:19:04 +00:00
|
|
|
|
2011-09-20 12:05:30 +00:00
|
|
|
%build
|
2018-02-02 13:16:04 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2018-07-10 11:11:33 +00:00
|
|
|
export PYCURL_SSL_LIBRARY=openssl
|
2019-07-23 10:28:57 +00:00
|
|
|
%python_build --with-openssl
|
2011-09-20 12:05:30 +00:00
|
|
|
|
|
|
|
%install
|
2018-07-10 11:11:33 +00:00
|
|
|
export PYCURL_SSL_LIBRARY=openssl
|
|
|
|
%python_install --with-openssl
|
2018-08-29 08:33:51 +00:00
|
|
|
|
2012-05-02 14:06:38 +00:00
|
|
|
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
|
2018-08-29 08:33:51 +00:00
|
|
|
|
2018-09-10 21:28:39 +00:00
|
|
|
%{python_expand \
|
|
|
|
$python -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}
|
|
|
|
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}
|
|
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
}
|
2011-09-20 12:05:30 +00:00
|
|
|
|
Accepting request 293100 from home:Nijel:branches:devel:languages:python
- Run testsuite during build
- Update to 7.19.5.1:
* Added CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5_HOSTNAME.
* setup.py now prints PycURL-specific option help when -h is used.
* LibreSSL is now supported (patch by JiCiT.)
* Fixed an oversight that broke PycURL building against libcurl 7.19.4
through 7.21.1. The bug was introduced in PycURL 7.19.5.
* Tests are now included in source distributions again, thanks to
Kamil Dudka and Johan Bergstroem.
* Added CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT (libcurl 7.20.0+)
and CURLOPT_MAIL_AUTH (libcurl 7.25.0+).
* Tests removed from source and binary distributions.
* Documentation greatly improved. Quickstart guide added.
* pycurl.Curl, pycurl.CurlMulti and pycurl.CurlShare are now classes
rather than factory functions. Previously, the classes were "hidden"
(they were accessible as e.g. type(pycurl.Curl()), but could not be
instantiated, nor could class methods be obtained from the classes.
Please see this mailing list post for further information:
http://curl.haxx.se/mail/curlpython-2014-06/0004.html
* When passing a file-like object to READDATA option, PycURL was
mistakenly looking for write method on this object. Now read method
is looked up, as would be expected.
* Python 3.4 is now officially supported.
* Windows packages now build libcurl against zlib.
* CherryPy is no longer required for the test suite, ssl module from
the Python standard library is used instead.
* Fixed a reference leak of SOCKET and TIMER callbacks on
CurlMulti instances, thanks to Ben Darnell.
* Fixed build against openssl on cygwin, where pycurl needs to link
OBS-URL: https://build.opensuse.org/request/show/293100
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=23
2015-03-25 14:11:46 +00:00
|
|
|
%check
|
2018-09-10 21:28:39 +00:00
|
|
|
%if %{with test}
|
2019-02-06 20:17:56 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2018-07-10 11:11:33 +00:00
|
|
|
export PYCURL_SSL_LIBRARY=openssl
|
2017-04-06 15:49:32 +00:00
|
|
|
# taken from "make test" because we only need to run nosetests,
|
|
|
|
# not the rest of the mess in the upstream runner
|
|
|
|
pushd tests/fake-curl/libcurl
|
|
|
|
rm -f *.so
|
2018-07-10 11:11:33 +00:00
|
|
|
make %{?_smp_mflags}
|
2017-04-06 15:49:32 +00:00
|
|
|
popd
|
2017-06-15 11:58:36 +00:00
|
|
|
# exclude certain tests
|
2020-12-15 11:17:18 +00:00
|
|
|
test_flags='online or occasionally_failing'
|
2017-06-15 11:58:36 +00:00
|
|
|
if ! pkg-config --variable=supported_features libcurl|grep -qw HTTP2; then
|
2020-12-15 11:17:18 +00:00
|
|
|
test_flags="$test_flags or http2"
|
2017-06-15 11:58:36 +00:00
|
|
|
fi
|
|
|
|
if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then
|
2020-12-15 11:17:18 +00:00
|
|
|
test_flags="$test_flags or ssh"
|
2017-06-15 11:58:36 +00:00
|
|
|
fi
|
2019-11-18 10:53:07 +00:00
|
|
|
# test_getinfo are failing with new bottle
|
2020-12-15 12:57:04 +00:00
|
|
|
%pytest_arch -s -k "not ($test_flags or test_getinfo)"
|
2020-06-22 14:07:12 +00:00
|
|
|
rm -rf %{buildroot}%{_prefix}/lib/debug %{buildroot}%{_libdir}/python*
|
2020-12-15 11:17:18 +00:00
|
|
|
# test
|
|
|
|
%endif
|
Accepting request 293100 from home:Nijel:branches:devel:languages:python
- Run testsuite during build
- Update to 7.19.5.1:
* Added CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5_HOSTNAME.
* setup.py now prints PycURL-specific option help when -h is used.
* LibreSSL is now supported (patch by JiCiT.)
* Fixed an oversight that broke PycURL building against libcurl 7.19.4
through 7.21.1. The bug was introduced in PycURL 7.19.5.
* Tests are now included in source distributions again, thanks to
Kamil Dudka and Johan Bergstroem.
* Added CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT (libcurl 7.20.0+)
and CURLOPT_MAIL_AUTH (libcurl 7.25.0+).
* Tests removed from source and binary distributions.
* Documentation greatly improved. Quickstart guide added.
* pycurl.Curl, pycurl.CurlMulti and pycurl.CurlShare are now classes
rather than factory functions. Previously, the classes were "hidden"
(they were accessible as e.g. type(pycurl.Curl()), but could not be
instantiated, nor could class methods be obtained from the classes.
Please see this mailing list post for further information:
http://curl.haxx.se/mail/curlpython-2014-06/0004.html
* When passing a file-like object to READDATA option, PycURL was
mistakenly looking for write method on this object. Now read method
is looked up, as would be expected.
* Python 3.4 is now officially supported.
* Windows packages now build libcurl against zlib.
* CherryPy is no longer required for the test suite, ssl module from
the Python standard library is used instead.
* Fixed a reference leak of SOCKET and TIMER callbacks on
CurlMulti instances, thanks to Ben Darnell.
* Fixed build against openssl on cygwin, where pycurl needs to link
OBS-URL: https://build.opensuse.org/request/show/293100
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=23
2015-03-25 14:11:46 +00:00
|
|
|
|
2019-04-08 13:58:31 +00:00
|
|
|
%if ! %{with test}
|
2017-04-06 15:49:32 +00:00
|
|
|
%files %{python_files}
|
2018-07-10 11:11:33 +00:00
|
|
|
%license COPYING-LGPL COPYING-MIT
|
|
|
|
%doc AUTHORS ChangeLog README.rst
|
2011-09-20 12:05:30 +00:00
|
|
|
%{python_sitearch}/*
|
|
|
|
|
2017-04-06 15:49:32 +00:00
|
|
|
%files -n %{name}-doc
|
2014-05-20 14:19:04 +00:00
|
|
|
%doc examples doc/*.rst
|
2019-04-08 13:58:31 +00:00
|
|
|
%endif
|
2011-09-20 12:05:30 +00:00
|
|
|
|
|
|
|
%changelog
|