%global pypi_name ndg_httpsclient %global py3_prefix python%{python3_pkgversion} Name: python-%{pypi_name} Version: 0.5.1 Release: 1%{?dist} Summary: Provides enhanced HTTPS support for httplib and urllib2 using PyOpenSSL License: BSD URL: https://github.com/cedadev/ndg_httpsclient/ Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-pyasn1 >= 0.1.1 BuildRequires: python3-devel BuildRequires: %{py3_prefix}-pyOpenSSL BuildRequires: python3-setuptools BuildRequires: openssl BuildRequires: /usr/bin/killall %description This is a HTTPS client implementation for httplib and urllib2 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the default provided with Python and importantly enables full verification of the SSL peer. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} This is a HTTPS client implementation for httplib and urllib2 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation over the default provided with Python and importantly enables full verification of the SSL peer. This is the python3 library. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build %install %py3_install %check pushd ndg/httpsclient/test/ ./scripts/openssl_https_server.sh & sleep 1 # the test suite is not working and we don't know why # upstream bugtracker is not functional #for FILE in test_*.py; do for FILE in test_utils.py; do PYTHONPATH=../../.. %{__python3} ./$FILE done killall openssl # Make sure the script uses the expected python version grep -qv python2 %{buildroot}%{_bindir}/ndg_httpclient %files -n python3-%{pypi_name} %{_bindir}/ndg_httpclient %{python3_sitelib}/ndg/ %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/ %changelog * Thu Jun 25 2020 Felix Schwarz - 0.5.1-1 - switch to 0.5.1 and Python 3 * Tue Oct 14 2014 Miro HronĨok - 0.3.2-1 - Initial package.