15
0

Accepting request 850728 from home:mcepl:branches:devel:languages:python

- Add two-basic-unit-tests.patch which includes two at least simple test
  patches (gh#certifi/python-certifi#137).

OBS-URL: https://build.opensuse.org/request/show/850728
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-certifi?expand=0&rev=50
This commit is contained in:
2020-11-25 13:44:34 +00:00
committed by Git OBS Bridge
parent 3746aa922f
commit 970a8cea3c
4 changed files with 112 additions and 17 deletions

View File

@@ -25,10 +25,14 @@ License: MPL-2.0
Group: Development/Languages/Python
URL: https://github.com/certifi/python-certifi
Source: https://files.pythonhosted.org/packages/source/c/certifi/certifi-%{version}.tar.gz
# PATCH-FIX-SUSE -- prefer SUSE certificates (only for use on SUSE platforms)
# PATCH-FIX-SUSE -- prefer SUSE certificates
Patch0: python-certifi-shipped-requests-cabundle.patch
# PATCH-FEATURE-UPSTREAM two-basic-unit-tests.patch gh#certifi/python-certifi#137 mcepl@suse.com
# Add at least primitive test suite (by bnavigator)
Patch1: two-basic-unit-tests.patch
BuildRequires: %{python_module setuptools}
BuildRequires: ca-certificates
BuildRequires: ca-certificates-mozilla
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: ca-certificates
@@ -44,10 +48,7 @@ identity of TLS hosts. It has been extracted from the Requests project.
Note that on SUSE packages the used CA bundle is actually the system bundle
%prep
%setup -q -n certifi-%{version}
%if 0%{?suse_version}
%patch0 -p1
%endif
%autosetup -p1 -n certifi-%{version}
%build
%python_build
@@ -57,9 +58,7 @@ Note that on SUSE packages the used CA bundle is actually the system bundle
%{python_expand chmod +x %{buildroot}%{$python_sitelib}/certifi/core.py
sed -i "s|#!%{_bindir}/env python|#!%__$python|" %{buildroot}/%{$python_sitelib}/certifi/core.py
%if 0%{?suse_version}
rm %{buildroot}%{$python_sitelib}/certifi/cacert.pem
%endif
}
%python_expand $python -m compileall %{buildroot}%{$python_sitelib}/certifi/
@@ -68,8 +67,7 @@ Note that on SUSE packages the used CA bundle is actually the system bundle
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# There are no upstream unit tests https://github.com/certifi/python-certifi/issues/136
# Please check that downstream packages like python-requests still build after an update of certifi
%pyunittest -v certifi.tests.test_certifi
%files %{python_files}
%license LICENSE