Package for EPEL7
This commit is contained in:
parent
0263dd3d66
commit
5e78a00ff7
@ -1,8 +1,14 @@
|
||||
%global srcname requests-file
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%bcond_with python3
|
||||
%else
|
||||
%bcond_without python3
|
||||
%endif
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 1.4.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Transport adapter for using file:// URLs with python-requests
|
||||
|
||||
License: ASL 2.0
|
||||
@ -21,6 +27,16 @@ This is the Python 2 version of the requests_file module
|
||||
Summary: Transport adapter for using file:// URLs with python-requests
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
# EL7 has unversioned names for these packages
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python-six
|
||||
|
||||
Requires: python-requests
|
||||
Requires: python-six
|
||||
%else
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-requests
|
||||
@ -28,6 +44,7 @@ BuildRequires: python2-six
|
||||
|
||||
Requires: python2-requests
|
||||
Requires: python2-six
|
||||
%endif
|
||||
|
||||
%description -n python2-%{srcname}
|
||||
Requests-File is a transport adapter for use with the Requests Python
|
||||
@ -35,6 +52,7 @@ library to allow local file system access via file:// URLs.
|
||||
|
||||
This is the Python 2 version of the requests_file module
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-requests-file
|
||||
Summary: Transport adapter for using file:// URLs with python3-requests
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
@ -52,6 +70,7 @@ 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}
|
||||
@ -59,15 +78,21 @@ rm -rf requests_file.egg-info
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
%check
|
||||
%{__python2} setup.py test
|
||||
%if %{with python3}
|
||||
%{__python3} setup.py test
|
||||
%endif
|
||||
|
||||
%files -n python2-%{srcname}
|
||||
%license LICENSE
|
||||
@ -75,14 +100,19 @@ rm -rf requests_file.egg-info
|
||||
%{python2_sitelib}/requests_file.py*
|
||||
%{python2_sitelib}/requests_file*.egg-info*
|
||||
|
||||
%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
|
||||
* Wed Feb 7 2018 Eli Young <elyscape@gmail.com> - 1.4.3-3
|
||||
- Package for EPEL7
|
||||
|
||||
* Sat Jan 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.4.3-2
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
Loading…
Reference in New Issue
Block a user