python-requests-file-1.4.3-9

Remove the python2 subpackage
Remove all the dumb %if statements
This commit is contained in:
David Shea 2018-12-17 11:00:51 -05:00
parent 7c7273c384
commit e932bdd6b9

View File

@ -1,26 +1,13 @@
%global srcname requests-file
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%if 0%{?rhel} > 7
# Disable python2 build by default
%bcond_with python2
%else
%bcond_without python2
%endif
Name: python-%{srcname}
Version: 1.4.3
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Transport adapter for using file:// URLs with python-requests
License: ASL 2.0
URL: https://github.com/dashea/requests-file
Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
Source0: %pypi_source
BuildArch: noarch
@ -30,27 +17,6 @@ library to allow local file system access via file:// URLs.
This is the Python 2 version of the requests_file module
%if %{with python2}
%package -n python2-%{srcname}
Summary: Transport adapter for using file:// URLs with python-requests
%{?python_provide:%python_provide python2-%{srcname}}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-requests
BuildRequires: python2-six
Requires: python2-requests
Requires: python2-six
%description -n python2-%{srcname}
Requests-File is a transport adapter for use with the Requests Python
library to allow local file system access via file:// URLs.
This is the Python 2 version of the requests_file module
%endif
%if %{with python3}
%package -n python3-requests-file
Summary: Transport adapter for using file:// URLs with python3-requests
%{?python_provide:%python_provide python3-%{srcname}}
@ -68,54 +34,32 @@ Requests-File is a transport adapter for use with the Requests Python
library to allow local file system access via file:// URLs.
This is the Python 3 version of the requests_file module
%endif
%prep
%autosetup -n %{srcname}-%{version}
rm -rf requests_file.egg-info
%build
%if %{with python2}
%py2_build
%endif
%if %{with python3}
%py3_build
%endif
%install
%if %{with python2}
%py2_install
%endif
%if %{with python3}
%py3_install
%endif
%check
%if %{with python2}
%{__python2} setup.py test
%endif
%if %{with python3}
%{__python3} setup.py test
%endif
%if %{with python2}
%files -n python2-%{srcname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/requests_file.py*
%{python2_sitelib}/requests_file*.egg-info*
%endif
%if %{with python3}
%files -n python3-requests-file
%license LICENSE
%doc README.rst
%{python3_sitelib}/requests_file.py*
%{python3_sitelib}/__pycache__/requests_file.*
%{python3_sitelib}/requests_file*.egg-info*
%endif
%changelog
* Mon Dec 17 2018 David Shea <dshea@redhat.com> - 1.4.3-9
- Remove the python2 subpackage
- Remove all the dumb %%if statements
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild