14
0
forked from pool/python-pycurl
Files
python-pycurl/python-pycurl.spec

158 lines
4.9 KiB
RPMSpec
Raw Normal View History

#
- update to 7.45.3: * Add CURLOPT_REQUEST_TARGET option * Add missing 2nd parameters to METH_NOARGS functions * Add CURLOPT_AWS_SIGV4 option (patch by Scott Talbert). * Add consistent names for newer Curl version constants * Only run HTTP version 3 option constant test if curl supported * Expose COMPILE_SSL_LIB in Python and use for test filtering * Filter tests based on *compile* libcurl version not runtime version * Use print function in callbacks documentation * Add missing shebang to tests/ext/test-suite.sh * Officially declare support for Python 3.12 * Fix curl_multi_info_read flow that loses messages * Support using environment variables for setup on Windows * Add support for Schannel SSL backend (patch by Scott Talbert) * Skip HTTP2 tests based on a curl support check * Fix fake-curl tests so they work when run out of tree * xfail test_easy_pause_unpause unconditionally * Provide generic error strings in pycurl.error objects * Change URLs to new curl mailing list (patch by Michael C). * Add missing HTTPS proxy options (patch by Jean Hominal). * Add support for setting CURLOPT_SSLCERT_BLOB * Add support for setting rest of CURLOPTTYPE_BLOB fields * Build wheels on Linux/macOS/Windows (patch by Scott Talbert). - drop pause-unpause-xfail.patch (upstream) - refresh python-pycurl-7.43.0-tls-backend.patch - remove runtime curl version check and __DATE__ __TIME__ usage - Add Source URL, see https://en.opensuse.org/SourceUrls - added python3 package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=106
2024-06-06 19:37:11 +00:00
# spec file for package python-pycurl
#
- update to 7.45.3: * Add CURLOPT_REQUEST_TARGET option * Add missing 2nd parameters to METH_NOARGS functions * Add CURLOPT_AWS_SIGV4 option (patch by Scott Talbert). * Add consistent names for newer Curl version constants * Only run HTTP version 3 option constant test if curl supported * Expose COMPILE_SSL_LIB in Python and use for test filtering * Filter tests based on *compile* libcurl version not runtime version * Use print function in callbacks documentation * Add missing shebang to tests/ext/test-suite.sh * Officially declare support for Python 3.12 * Fix curl_multi_info_read flow that loses messages * Support using environment variables for setup on Windows * Add support for Schannel SSL backend (patch by Scott Talbert) * Skip HTTP2 tests based on a curl support check * Fix fake-curl tests so they work when run out of tree * xfail test_easy_pause_unpause unconditionally * Provide generic error strings in pycurl.error objects * Change URLs to new curl mailing list (patch by Michael C). * Add missing HTTPS proxy options (patch by Jean Hominal). * Add support for setting CURLOPT_SSLCERT_BLOB * Add support for setting rest of CURLOPTTYPE_BLOB fields * Build wheels on Linux/macOS/Windows (patch by Scott Talbert). - drop pause-unpause-xfail.patch (upstream) - refresh python-pycurl-7.43.0-tls-backend.patch - remove runtime curl version check and __DATE__ __TIME__ usage - Add Source URL, see https://en.opensuse.org/SourceUrls - added python3 package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=106
2024-06-06 19:37:11 +00:00
# Copyright (c) 2024 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define oldpython python
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%define upversion 7.45.3
%{?sle15_python_module_pythons}
Name: python-pycurl%{psuffix}
- update to 7.45.3: * Add CURLOPT_REQUEST_TARGET option * Add missing 2nd parameters to METH_NOARGS functions * Add CURLOPT_AWS_SIGV4 option (patch by Scott Talbert). * Add consistent names for newer Curl version constants * Only run HTTP version 3 option constant test if curl supported * Expose COMPILE_SSL_LIB in Python and use for test filtering * Filter tests based on *compile* libcurl version not runtime version * Use print function in callbacks documentation * Add missing shebang to tests/ext/test-suite.sh * Officially declare support for Python 3.12 * Fix curl_multi_info_read flow that loses messages * Support using environment variables for setup on Windows * Add support for Schannel SSL backend (patch by Scott Talbert) * Skip HTTP2 tests based on a curl support check * Fix fake-curl tests so they work when run out of tree * xfail test_easy_pause_unpause unconditionally * Provide generic error strings in pycurl.error objects * Change URLs to new curl mailing list (patch by Michael C). * Add missing HTTPS proxy options (patch by Jean Hominal). * Add support for setting CURLOPT_SSLCERT_BLOB * Add support for setting rest of CURLOPTTYPE_BLOB fields * Build wheels on Linux/macOS/Windows (patch by Scott Talbert). - drop pause-unpause-xfail.patch (upstream) - refresh python-pycurl-7.43.0-tls-backend.patch - remove runtime curl version check and __DATE__ __TIME__ usage - Add Source URL, see https://en.opensuse.org/SourceUrls - added python3 package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=106
2024-06-06 19:37:11 +00:00
Version: 7.45.3
Release: 0
Summary: PycURL -- cURL library module
License: LGPL-2.1-or-later AND MIT
URL: http://pycurl.io/
Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz
# Source: pycurl-%%{version}.tar.gz
# PATCH-FIX-OPENSUSE increase_test_timeout.diff -- Increase the timeout in a test so it doesn't fail when obs is overloaded
Patch0: increase_test_timeout.diff
# PATCH-FIX-UPSTREAM handle difference between libssh and libssh2
Patch1: pycurl-libssh.patch
- Update to 7.45.1: * Fixed build against libcurl < 7.64.1 (patch by Scott Talbert). * Add CURLOPT_MAXLIFETIME_CONN (patch by fsbs). * Easy handle duplication support (patch by fsbs). * Support for unsetting a number of multi options (patch by fsbs). * pycurl classes can now be subclassed (patch by fsbs). * Multi callbacks' thread state management fixed (patch by fsbs). * Add CURL_LOCK_DATA_PSL (patch by fsbs). * Add support for SecureTransport SSL backend (MacOS) (patch by Scott Talbert). * Fixed Python thread initialization causing hangs on operations (patch by Scott Talbert). * getinfo(CURLINFO_FTP_ENTRY_PATH) now handles NULL return from libcurl, returning None in this case. * Python 3.9 is now officially supported (patch by Bill Collins). * Added CURLOPT_DOH_URL (patch by resokou). * Best effort Python 2 support has been reinstated. * Added missing fields to curl_version_info struct (patch by Hasan). * Added CURLINFO_CONDITION_UNMET (patch by Dima Tisnek). * Exposed MAX_CONCURRENT_STREAMS in CurlMulti (patch by Alexandre Pion). * Compilation fixed against Python 3.10 alpha (patch by Kamil Dudka). - Remove patch curl7770_compatibility.patch and remove_nose.patch: * They have both merged upstream. - Modify patch disable_randomly_failing_tests.patch: * Use pytest rather than nose methods. - Add patch curl-789-error-message.patch: * Handle missing ! in a returned error message. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=89
2022-04-28 06:01:44 +00:00
Patch2: disable_randomly_failing_tests.patch
# PATCH-FIX-OPENSUSE make-leap15-compat.patch mcepl@suse.com
# Make tests passing with Leap 15.2
- Update to 7.45.1: * Fixed build against libcurl < 7.64.1 (patch by Scott Talbert). * Add CURLOPT_MAXLIFETIME_CONN (patch by fsbs). * Easy handle duplication support (patch by fsbs). * Support for unsetting a number of multi options (patch by fsbs). * pycurl classes can now be subclassed (patch by fsbs). * Multi callbacks' thread state management fixed (patch by fsbs). * Add CURL_LOCK_DATA_PSL (patch by fsbs). * Add support for SecureTransport SSL backend (MacOS) (patch by Scott Talbert). * Fixed Python thread initialization causing hangs on operations (patch by Scott Talbert). * getinfo(CURLINFO_FTP_ENTRY_PATH) now handles NULL return from libcurl, returning None in this case. * Python 3.9 is now officially supported (patch by Bill Collins). * Added CURLOPT_DOH_URL (patch by resokou). * Best effort Python 2 support has been reinstated. * Added missing fields to curl_version_info struct (patch by Hasan). * Added CURLINFO_CONDITION_UNMET (patch by Dima Tisnek). * Exposed MAX_CONCURRENT_STREAMS in CurlMulti (patch by Alexandre Pion). * Compilation fixed against Python 3.10 alpha (patch by Kamil Dudka). - Remove patch curl7770_compatibility.patch and remove_nose.patch: * They have both merged upstream. - Modify patch disable_randomly_failing_tests.patch: * Use pytest rather than nose methods. - Add patch curl-789-error-message.patch: * Handle missing ! in a returned error message. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=89
2022-04-28 06:01:44 +00:00
Patch3: make-leap15-compat.patch
# PATCH-FIX-UPSTREAM test-bottle-flask.patch gh#pycurl/pycurl#838
Patch4: test-bottle-flask.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(libcurl) >= 7.19.0
BuildRequires: pkgconfig(openssl)
%if %{with test}
BuildRequires: %{python_module Flask}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module pytest}
%endif
%ifpython2
Provides: %{oldpython}-curl = %{version}
Obsoletes: %{oldpython}-curl < %{version}
%endif
%python_subpackages
%description
This module provides bindings for the cURL library.
%if 0%{?suse_version} > 1500
%package -n %{name}-doc
Summary: Documentation for python-curl
Provides: %{python_module pycurl-doc = %{version}}
BuildArch: noarch
%description -n %{name}-doc
This module provides bindings for the cURL library.
This package contains documentation and examples.
%endif
%prep
- Update to 7.45.1: * Fixed build against libcurl < 7.64.1 (patch by Scott Talbert). * Add CURLOPT_MAXLIFETIME_CONN (patch by fsbs). * Easy handle duplication support (patch by fsbs). * Support for unsetting a number of multi options (patch by fsbs). * pycurl classes can now be subclassed (patch by fsbs). * Multi callbacks' thread state management fixed (patch by fsbs). * Add CURL_LOCK_DATA_PSL (patch by fsbs). * Add support for SecureTransport SSL backend (MacOS) (patch by Scott Talbert). * Fixed Python thread initialization causing hangs on operations (patch by Scott Talbert). * getinfo(CURLINFO_FTP_ENTRY_PATH) now handles NULL return from libcurl, returning None in this case. * Python 3.9 is now officially supported (patch by Bill Collins). * Added CURLOPT_DOH_URL (patch by resokou). * Best effort Python 2 support has been reinstated. * Added missing fields to curl_version_info struct (patch by Hasan). * Added CURLINFO_CONDITION_UNMET (patch by Dima Tisnek). * Exposed MAX_CONCURRENT_STREAMS in CurlMulti (patch by Alexandre Pion). * Compilation fixed against Python 3.10 alpha (patch by Kamil Dudka). - Remove patch curl7770_compatibility.patch and remove_nose.patch: * They have both merged upstream. - Modify patch disable_randomly_failing_tests.patch: * Use pytest rather than nose methods. - Add patch curl-789-error-message.patch: * Handle missing ! in a returned error message. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=89
2022-04-28 06:01:44 +00:00
%autosetup -p1 -n pycurl-%{version}
# temporarily remove a failing test-case until the issue is
# fixed in curl: https://github.com/curl/curl/issues/6615
rm -f tests/failonerror_test.py
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export PYCURL_SSL_LIBRARY=openssl
%pyproject_wheel
%install
export PYCURL_SSL_LIBRARY=openssl
%pyproject_install
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
%{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}
}
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
%if %{with test}
export LANG=en_US.UTF-8
export PYCURL_SSL_LIBRARY=openssl
# 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
%make_build
popd
# exclude certain tests
test_flags='online or occasionally_failing'
if ! pkg-config --variable=supported_features libcurl|grep -qw HTTP2; then
test_flags="$test_flags or http2"
fi
if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then
test_flags="$test_flags or ssh"
fi
if ! pkg-config --variable=supported_protocols libcurl|grep -qw HTTP3; then
test_flags="$test_flags or http_version_3"
fi
# test_getinfo are failing with new bottle
dont_test="or test_getinfo "
# test_multi_socket_select fails with new curl gh#pycurl/pycurl#819
dont_test+="or test_multi_socket_select "
# test_multi_socket_action gh#pycurl/pycurl#729
dont_test+="or test_multi_socket_action "
# just get rid of all test_multi tests
dont_test+="or test_multi_ "
# test_request_with_verifypeer for gh#pycurl/pycurl#822
dont_test+="or test_request_with_verifypeer "
%pytest_arch -s -k "not ($test_flags $dont_test)"
rm -rf %{buildroot}%{_prefix}/lib/debug %{buildroot}%{_libdir}/python*
# 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
%if ! %{with test}
%files %{python_files}
%license COPYING-LGPL COPYING-MIT
%doc AUTHORS ChangeLog README.rst
%{python_sitearch}/curl
%{python_sitearch}/pycurl*.so
%{python_sitearch}/pycurl-%{upversion}*-info
%if 0%{?suse_version} > 1500
%files -n %{name}-doc
%endif
%doc examples doc/*.rst
%endif
%changelog