#2 Rebuild according to newer Python packaging guidelines
Opened 5 years ago by sagitter. Modified 4 years ago
rpms/ sagitter/python-oauth master  into  rawhide

file modified
+101 -21
@@ -1,50 +1,130 @@ 

- %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

+ %if 0%{?rhel} && 0%{?rhel} < 8

+ %global with_python3 1

+ %global with_python2 1

+ %endif

+ 

+ %if 0%{?rhel} && 0%{?rhel} > 7

+ %global with_python3 1

+ %global with_python2 0

+ %endif

+ 

+ %if 0%{?fedora} && 0%{?fedora} > 29

+ %global with_python3 1

+ %global with_python2 0

+ %endif

+ 

+ %if 0%{?fedora} && 0%{?fedora} <= 29

+ %global with_python3 1

+ %global with_python2 1

+ %endif

+ 

+ %global module oauth

  

  Name:           python-oauth

  Version:        1.0.1

- Release:        18%{?dist}

+ Release:        19%{?dist}

  Summary:        Library for OAuth version 1.0a

- 

- Group:          Development/Languages

  License:        MIT

  URL:            http://code.google.com/p/oauth/

- Source0:        http://pypi.python.org/packages/source/o/oauth/oauth-%{version}.tar.gz

+ Source0:        http://pypi.python.org/packages/source/o/%{module}/%{module}-%{version}.tar.gz

  

  BuildArch:      noarch

- BuildRequires:  python2-devel python2-setuptools

+ 

+ %if 0%{?with_python3_other}

+ BuildRequires:  python%{python3_other_pkgversion}-devel

+ %endif

  

  %global _description\

  Library for OAuth version 1.0a.\

  

+ %description

+ %_description

  

- %description %_description

- 

- %package -n python2-oauth

+ %if 0%{?with_python2}

+ %package -n python2-%{module}

  Summary: %summary

  %{?python_provide:%python_provide python2-oauth}

  

- %description -n python2-oauth %_description

+ BuildRequires:  python2-devel python2-setuptools

  

- %prep

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

+ %description -n python2-%{module}

+ %_description

+ %endif

  

+ %if 0%{?with_python3}

+ %package -n python%{python3_pkgversion}-%{module}

+ Summary: %summary

+ %{?python_provide:%python_provide python%{python3_pkgversion}-%{module}}

  

- %build

- python setup.py build

+ BuildRequires:  python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools

  

+ %description -n python%{python3_pkgversion}-oauth

+ %_description

+ %endif

  

- %install

- rm -rf $RPM_BUILD_ROOT

- python setup.py install --skip-build --root $RPM_BUILD_ROOT

+ %if 0%{?with_python3_other}

+ %package -n python%{python3_other_pkgversion}-%{module}

+ Summary: %summary

  

-  

+ %{?python_provide:%python_provide python%{python3_other_pkgversion}-%{module}}

  

- %files -n python2-oauth

- %doc LICENSE.txt

- %{python2_sitelib}/*

+ BuildRequires:    python%{python3_other_pkgversion}-devel

+ BuildRequires:    python%{python3_other_pkgversion}-setuptools

  

+ %description -n python%{python3_other_pkgversion}-%{module}

+ %_description

+ %endif # with_python3_other

+ 

+ %prep

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

+ 

+ %build

+ %if 0%{?with_python2}

+ %py2_build

+ %endif

+ %if 0%{?with_python3}

+ %py3_build

+ %endif

+ %if 0%{?with_python3_other}

+ %py3_other_build

+ %endif # with_python3_other

+ 

+ %install

+ %if 0%{?with_python2}

+ %py2_install

+ %endif

+ %if 0%{?with_python3}

+ %py3_install

+ %endif

+ %if 0%{?with_python3_other}

+ %py3_other_install

+ %endif

+  

+ %if 0%{?with_python2}

+ %files -n python2-%{module}

+ %license LICENSE.txt

+ %{python2_sitelib}/%{module}/

+ %{python2_sitelib}/%{module}-*.egg-info

+ %endif

+ 

+ %if 0%{?with_python3}

+ %files -n python%{python3_pkgversion}-%{module}

+ %license LICENSE.txt

+ %{python3_sitelib}/%{module}/

+ %{python3_sitelib}/%{module}-*.egg-info

+ %endif

+ 

+ %if 0%{?with_python3_other}

+ %files -n python%{python3_other_pkgversion}-%{module}

+ %license LICENSE.txt

+ %{python3_other_sitelib}/%{module}/

+ %{python3_other_sitelib}/%{module}-*.egg-info

+ %endif

  

  %changelog

+ * Sat Dec 08 2018 Antonio Trande <sagitterATfedoraproject.org> - 1.0.1-19

+ - Rebuild according to newer Python packaging guidelines

+ 

  * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-18

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

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- 30ed3cc8c11d7841a89feab437aabf81  oauth-1.0.1.tar.gz

+ SHA512 (oauth-1.0.1.tar.gz) = a503b1bfff18c97a0e666cc376bfcb11e3cc0f3340dd16e0254fcd4340ed28ab0fc52d1de81b573309351a5edaf83d0b437c155580c00e32a81a7c219ee7eca9

  • Only Python3 packages on f30+
  • Python3 package on el7
  • SPEC file improved

Please, build on epel7 too.

1 new commit added

  • Fix python3_other path
5 years ago

I just recently took over maintenance of this package. Can you update your pull request so that it will merge?