| |
@@ -2,14 +2,9 @@
|
| |
%global with_python3 1
|
| |
%endif
|
| |
|
| |
- %{!?__python2: %global __python2 /usr/bin/python2}
|
| |
- %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
| |
- %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
| |
- %{!?_licensedir:%global license %%doc}
|
| |
-
|
| |
Name: python-requests-mock
|
| |
Version: 1.3.0
|
| |
- Release: 5%{?dist}
|
| |
+ Release: 6%{?dist}
|
| |
Summary: A requests mocking tool for python
|
| |
|
| |
License: ASL 2.0
|
| |
@@ -33,19 +28,19 @@
|
| |
Requires: python2-six
|
| |
|
| |
# urllib3 required because requests packaging uses it and our patch uses it
|
| |
- Requires: python2-urllib3
|
| |
+ Requires: python%{?fedora:2}-urllib3
|
| |
|
| |
# standard requirements needed for testing
|
| |
BuildRequires: python2-requests
|
| |
BuildRequires: python2-six
|
| |
- BuildRequires: python2-urllib3
|
| |
+ BuildRequires: python%{?fedora:2}-urllib3
|
| |
|
| |
BuildRequires: python2-devel
|
| |
- BuildRequires: python2-fixtures
|
| |
+ BuildRequires: python%{?fedora:2}-fixtures
|
| |
BuildRequires: python2-mock
|
| |
BuildRequires: python2-pbr
|
| |
BuildRequires: python2-setuptools
|
| |
- BuildRequires: python2-testtools
|
| |
+ BuildRequires: python%{?fedora:2}-testtools
|
| |
|
| |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
| |
BuildRequires: python-discover
|
| |
@@ -98,30 +93,20 @@
|
| |
# Remove bundled egg-info
|
| |
rm -rf requests_mock.egg-info
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- rm -rf %{py3dir}
|
| |
- cp -a . %{py3dir}
|
| |
- %endif
|
| |
-
|
| |
|
| |
%build
|
| |
%py2_build
|
| |
|
| |
%if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
%py3_build
|
| |
- popd
|
| |
%endif
|
| |
|
| |
|
| |
%install
|
| |
- rm -rf $RPM_BUILD_ROOT
|
| |
%py2_install
|
| |
|
| |
%if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
%py3_install
|
| |
- popd
|
| |
%endif
|
| |
|
| |
|
| |
@@ -129,9 +114,7 @@
|
| |
%{__python2} -m testtools.run discover
|
| |
|
| |
%if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
%{__python3} -m testtools.run discover
|
| |
- popd
|
| |
%endif
|
| |
|
| |
|
| |
@@ -139,7 +122,7 @@
|
| |
%license LICENSE
|
| |
%doc README.rst ChangeLog
|
| |
%{python2_sitelib}/requests_mock
|
| |
- %{python2_sitelib}/requests_mock-%{version}-py2.?.egg-info
|
| |
+ %{python2_sitelib}/requests_mock-%{version}-py%{python2_version}.egg-info
|
| |
|
| |
|
| |
%if 0%{?with_python3}
|
| |
@@ -147,11 +130,14 @@
|
| |
%license LICENSE
|
| |
%doc README.rst ChangeLog
|
| |
%{python3_sitelib}/requests_mock
|
| |
- %{python3_sitelib}/requests_mock-%{version}-py3.?.egg-info
|
| |
+ %{python3_sitelib}/requests_mock-%{version}-py%{python3_version}.egg-info
|
| |
%endif
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Fri Jun 22 2018 Carl George <carl@george.computer> - 1.3.0-6
|
| |
+ - EPEL compatibility
|
| |
+
|
| |
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 1.3.0-5
|
| |
- Rebuilt for Python 3.7
|
| |
|
| |
This PR makes the spec file in master compatible with EL7. Once this is merged to master, master can be merged to epel7, and this can be built for EPEL.