14
0
forked from pool/python-pycurl
2018-07-10 11:11:33 +00:00
committed by Git OBS Bridge
parent 35703003f8
commit 7ebe19c858
5 changed files with 56 additions and 22 deletions

View File

@@ -19,12 +19,12 @@
%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pycurl
Version: 7.43.0.1
Version: 7.43.0.2
Release: 0
Summary: PycURL -- cURL library module
License: LGPL-2.1+ AND MIT
License: LGPL-2.1-or-later AND MIT
Group: Development/Languages/Python
Url: http://pycurl.sourceforge.net/
URL: http://pycurl.sourceforge.net/
Source: https://files.pythonhosted.org/packages/source/p/pycurl/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
@@ -34,6 +34,7 @@ BuildRequires: %{python_module bottle}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module nose}
BuildRequires: fdupes
BuildRequires: libcurl-devel >= 7.19.0
BuildRequires: openssl-devel
BuildRequires: python-rpm-macros
@@ -41,8 +42,6 @@ BuildRequires: python-rpm-macros
Provides: %{oldpython}-curl = %{version}
Obsoletes: %{oldpython}-curl < %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
@@ -67,19 +66,23 @@ This package contains documentation and examples.
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export PYCURL_SSL_LIBRARY=openssl
%python_build --with-ssl
%install
%python_install
export PYCURL_SSL_LIBRARY=openssl
%python_install --with-openssl
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export PYCURL_SSL_LIBRARY=openssl
%ifnarch %{arm} aarch64
# 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
make %{?_smp_mflags}
popd
# exclude certain tests
test_flags='!online'
@@ -94,12 +97,11 @@ fi
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING-LGPL COPYING-MIT README.rst
%license COPYING-LGPL COPYING-MIT
%doc AUTHORS ChangeLog README.rst
%{python_sitearch}/*
%files -n %{name}-doc
%defattr(-,root,root)
%doc examples doc/*.rst
%changelog