14
0
forked from pool/python-pycurl

Accepting request 855776 from home:mcepl:branches:devel:tools:scm

- Add remove_nose.patch to remove dependency on nose
  (gh#pycurl/pycurl#655).

OBS-URL: https://build.opensuse.org/request/show/855776
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=74
This commit is contained in:
2020-12-15 11:17:18 +00:00
committed by Git OBS Bridge
parent 2a83c29997
commit 7c52be85c5
3 changed files with 949 additions and 8 deletions

View File

@@ -40,6 +40,9 @@ Patch1: pycurl-libssh.patch
# 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
Patch3: disable_randomly_failing_tests.patch
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#pycurl/pycurl#655 mcepl@suse.com
# remove dependency on nose
Patch4: remove_nose.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -50,7 +53,7 @@ BuildRequires: pkgconfig(openssl)
%if %{with test}
BuildRequires: %{python_module bottle}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pytest}
%endif
%ifpython2
Provides: %{oldpython}-curl = %{version}
@@ -103,19 +106,18 @@ rm -f *.so
make %{?_smp_mflags}
popd
# exclude certain tests
test_flags='!online,!occasionally_failing'
test_flags='online or occasionally_failing'
if ! pkg-config --variable=supported_features libcurl|grep -qw HTTP2; then
test_flags="$test_flags,\!http2"
test_flags="$test_flags or http2"
fi
if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then
test_flags="$test_flags,\!ssh"
test_flags="$test_flags or ssh"
fi
# test_getinfo are failing with new bottle
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} \
nosetests-%{$python_bin_suffix} -v --with-flaky -a "$test_flags" -e 'test_getinfo'
}
%pytest_arch -k "not ($test_flags or test_getinfo)"
rm -rf %{buildroot}%{_prefix}/lib/debug %{buildroot}%{_libdir}/python*
%endif # test
# test
%endif
%if ! %{with test}
%files %{python_files}