forked from pool/python-pycurl
Accepting request 486190 from devel:languages:python:singlespec
- update for multipython build - merge python3 project - update and apply pycurl-no-runtime-curlvercheck.patch - run test suite - single doc package for all pythons - update to version 7.43.0: * Highlights of this release: + Binary wheels are now built for Windows systems. + setopt_string method added to Curl objects to permit setting string libcurl options that PycURL does not know about. + curl module can now be imported on Windows again. + OPENSOCKETFUNCTION callback is now invoked with the address as bytes on Python 3 as was documented. + Support for many libcurl options and constants was added. - specfile: * update copyright year * update patch - update to version 7.21.5: * Highlights of this release: + Socket callbacks are now fully implemented ("CURLOPT_OPENSOCKETFUNCTION", "CURLOPT_SOCKOPTFUNCTION", "CURLOPT_CLOSESOCKETFUNCTION"). Unfortunately this required changing "OPENSOCKETFUNCTION" API once again in a backwards-incompatible manner. Support for "SOCKOPTFUNCTION" and "CLOSESOCKETFUNCTION" was added in this release. "OPENSOCKETFUNCTION" now supports Unix sockets. + Many other libcurl options and constants have been added to PycURL. OBS-URL: https://build.opensuse.org/request/show/486190 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=25
This commit is contained in:
committed by
Git OBS Bridge
parent
de9105ba7b
commit
6a7bfb0850
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pycurl
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,68 +16,87 @@
|
||||
#
|
||||
|
||||
|
||||
%define oldpython python
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pycurl
|
||||
Version: 7.19.5.1
|
||||
Version: 7.43.0
|
||||
Release: 0
|
||||
Url: http://pycurl.sourceforge.net/
|
||||
Summary: PycURL -- cURL library module
|
||||
License: LGPL-2.1+ and MIT
|
||||
Group: Development/Languages/Python
|
||||
Source: https://pypi.python.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz
|
||||
Url: http://pycurl.sourceforge.net/
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM remove __DATE__ and __TIME__
|
||||
Patch0: pycurl-no-runtime-curlvercheck.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: %{python_module CherryPy}
|
||||
BuildRequires: %{python_module bottle}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module flaky}
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module pyflakes}
|
||||
BuildRequires: %{python_module simplejson}
|
||||
BuildRequires: libcurl-devel >= 7.19.0
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: python-CherryPy
|
||||
BuildRequires: python-bottle
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python-simplejson
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-CherryPy
|
||||
Requires: python-bottle
|
||||
Requires: python-simplejson
|
||||
%if 0%{?suse_version}
|
||||
%py_requires
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-curl = %{version}
|
||||
Obsoletes: %{oldpython}-curl < %{version}
|
||||
%endif
|
||||
Provides: python-curl = %{version}
|
||||
Obsoletes: python-curl < %{version}
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This module provides bindings for the cURL library.
|
||||
|
||||
%package doc
|
||||
%package -n %{name}-doc
|
||||
Summary: Documentation for python-curl
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
Provides: %{python_module pycurl-doc = %{version}}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
%description -n %{name}-doc
|
||||
This module provides bindings for the cURL library.
|
||||
|
||||
This package contains documentation and examples.
|
||||
|
||||
%prep
|
||||
%setup -q -n pycurl-%{version}
|
||||
# %patch0 -p1
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags}" python setup.py build --with-ssl
|
||||
export CFLAGS="%{optflags}"
|
||||
%python_build --with-ssl
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --with-ssl
|
||||
%python_install
|
||||
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
|
||||
|
||||
%check
|
||||
%if 0%{?suse_version} >= 1320
|
||||
make test
|
||||
# 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
|
||||
popd
|
||||
EXCLUDES=""
|
||||
%if 0%{?suse_version} < 1320
|
||||
# CURL too old to know HTTP/2
|
||||
EXCLUDES="-e test_http_version_2_0"
|
||||
%endif
|
||||
%{python_expand PYTHONPATH=$(ls -d build/lib.*) \
|
||||
nosetests-%$python_bin_suffix --with-flaky -a '!online' $EXCLUDES}
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS ChangeLog COPYING-LGPL COPYING-MIT README.rst
|
||||
%{python_sitearch}/*
|
||||
|
||||
%files doc
|
||||
%files -n %{name}-doc
|
||||
%defattr(-,root,root)
|
||||
%doc examples doc/*.rst
|
||||
|
||||
|
Reference in New Issue
Block a user