#1 Build both python2 and python3 packages.
Merged 2 years ago by hobbes1069. Opened 2 years ago by hobbes1069.
rpms/ hobbes1069/python-requests-cache master  into  master

file modified
+30 -5
@@ -3,7 +3,7 @@ 

  

  Name:           python-%{pypi_name}

  Version:        0.4.13

- Release:        6%{?dist}

+ Release:        7%{?dist}

  Summary:        Persistent cache for requests library

  

  License:        BSD
@@ -11,11 +11,14 @@ 

  Source0:        https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

  BuildArch:      noarch

  

- BuildRequires:  python3-sphinx

- 

+ # Python 3 is default

  BuildRequires:  python3-devel

  BuildRequires:  python3-requests

  BuildRequires:  python3-sphinx

+ # Python 2

+ BuildRequires:  python2-devel

+ BuildRequires:  python2-requests

+ BuildRequires:  python2-sphinx

  

  %global _description\

  Requests-cache is a transparent persistent\
@@ -32,9 +35,18 @@ 

  Requests-cache is a transparent persistent

  cache for the requests (version >= 1.1.0) library.

  

+ %package -n     python2-%{pypi_name}

+ Summary:        Persistent cache for requests library

+ 

+ Requires:       python2-requests >= 1.1.0

+ 

+ %description -n python2-%{pypi_name}

+ Requests-cache is a transparent persistent

+ cache for the requests (version >= 1.1.0) library.

+ 

  

  %prep

- %setup -q -n %{pypi_name}-%{version}

+ %autosetup -n %{pypi_name}-%{version}

  # Remove bundled egg-info

  rm -rf %{pypi_name}.egg-info

  
@@ -52,10 +64,13 @@ 

  

  

  %build

+ %py2_build

  %py3_build

  

+ 

  %install

  %py3_install

+ %py2_install

  

  # Fix rpmlints:

  for lib in `find %{buildroot}%{python3_sitelib}/requests_cache -name '*.py' -print`; do
@@ -69,12 +84,22 @@ 

  sed -i 's/\r$//' LICENSE

  

  %files -n python3-%{pypi_name}

- %doc html README.rst LICENSE

+ %doc html README.rst

+ %license LICENSE

  %{python3_sitelib}/requests_cache

  %{python3_sitelib}/requests_cache-%{version}*

  

+ %files -n python2-%{pypi_name}

+ %doc html README.rst

+ %license LICENSE

+ %{python2_sitelib}/requests_cache

+ %{python2_sitelib}/requests_cache-%{version}*

+ 

  

  %changelog

+ * Thu Feb 14 2019 Richard Shaw <hobbes1069@gmail.com> - 0.4.13-7

+ - Build both python2 and python3 packages.

+ 

  * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.13-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

  

python2-request-cache is still needed, in my case specifically for MythTV in RPM Fusion.

Pull-Request has been merged by hobbes1069

2 years ago