From dd0a1eeded729317ad6eb85441b8441e5e33ac56 Mon Sep 17 00:00:00 2001 From: Jakub Dorňák Date: Mar 02 2016 14:12:45 +0000 Subject: add python2- subpackage --- diff --git a/.gitignore b/.gitignore index 5136e6b..e7968d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/django-fas-1.0.2.tar.gz -/django-fas-1.0.3.tar.gz +/*/ +/*.tar.gz diff --git a/python-django-fas.spec b/python-django-fas.spec index e9190ad..a51d3a6 100644 --- a/python-django-fas.spec +++ b/python-django-fas.spec @@ -1,16 +1,8 @@ -%if 0%{?fedora} -%bcond_without python3 -%else -%global with_python3 0 -%{!?__python2: %global __python2 %{__python}} -%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} -%endif - %global pkgname django-fas Name: python-%{pkgname} Version: 1.0.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Django auth backend for FAS (Fedora Accounts System) Group: Development/Libraries License: BSD @@ -20,20 +12,27 @@ Source0: https://pypi.python.org/packages/source/d/%{pkgname}/%{pkgname}- BuildArch: noarch BuildRequires: python2-devel -BuildRequires: python-setuptools -%if 0%{?with_python3} +BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools -%endif -Requires: python-django -Requires: python-openid +%description +This is Django auth backend for FAS (Fedora Accounts System). + + +%package -n python2-%{pkgname} +Summary: Django auth backend for FAS (Fedora Accounts System) +Group: Development/Libraries +Requires: python2-django +Requires: python2-openid Provides: %{pkgname} = %{version}-%{release} +Provides: %{name} = %{version}-%{release} +Obsoletes: %{name} < 1.0.3-4 -%description +%description -n python2-%{pkgname} This is Django auth backend for FAS (Fedora Accounts System). -%if 0%{?with_python3} + %package -n python3-%{pkgname} Summary: Django auth backend for FAS (Fedora Accounts System) Group: Development/Libraries @@ -43,45 +42,29 @@ Provides: %{pkgname} = %{version}-%{release} %description -n python3-%{pkgname} This is Django auth backend for FAS (Fedora Accounts System). -%endif %prep -%setup -q -n %{pkgname}-%{version} - -%if 0%{?with_python3} -cp -a . %{py3dir} -%endif +%autosetup -n %{pkgname}-%{version} %build -%{__python2} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif +%{py2_build} +%{py3_build} %install -%{__python2} setup.py install --skip-build --root %{buildroot} +%{py2_install} +%{py3_install} -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -popd -%endif - -%files +%files -n python2-%{pkgname} %doc LICENSE README.md %dir %{python2_sitelib}/fas %{python2_sitelib}/fas/*.py* %{python2_sitelib}/django_fas-%{version}-py2.*.egg-info -%if 0%{?with_python3} %files -n python3-%{pkgname} %doc LICENSE README.md %dir %{python3_sitelib}/fas @@ -89,9 +72,12 @@ popd %dir %{python3_sitelib}/fas/__pycache__ %{python3_sitelib}/fas/__pycache__/*.py* %{python3_sitelib}/django_fas-%{version}-py3.*.egg-info -%endif + %changelog +* Wed Mar 2 2016 Jakub Dorňák - 1.0.3-4 +- add python2- subpackage + * Thu Feb 04 2016 Fedora Release Engineering - 1.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild