%if 0%{?fedora} %global with_python3 1 %endif %{!?_licensedir: %global license %%doc} %global distname djangorestframework-composed-permissions Name: python-django-rest-framework-composed-permissions Version: 0.1 Release: 1%{?dist} Summary: Composed permissions for django-rest-framework License: BSD URL: http://pypi.python.org/pypi/%{distname} Source0: https://pypi.python.org/packages/f9/8a/0e472957e7f0d5e689884fa2dc6f1a7771b4bac7ec94d2717928c0bae7a1/%{distname}-%{version}.tar.gz BuildArch: noarch %description A simple way to define complex permissions for django-rest-framework. https://djangorestframework-composed-permissions.readthedocs.org/en/latest/ %package -n python2-django-rest-framework-composed-permissions Summary: Composed permissions for django-rest-framework %{?python_provide:%python_provide python2-django-rest-framework-composed-permissions} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python-django-rest-framework %if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: python-django %else BuildRequires: python2-django %endif Requires: python-django-rest-framework Requires: python2-django %description -n python2-django-rest-framework-composed-permissions A simple way to define complex permissions for django-rest-framework. https://djangorestframework-composed-permissions.readthedocs.org/en/latest/ %if 0%{?with_python3} %package -n python3-django-rest-framework-composed-permissions Summary: Composed permissions for django-rest-framework %{?python_provide:%python_provide python3-django-rest-framework-composed-permissions} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-django BuildRequires: python3-django-rest-framework Requires: python3-django Requires: python3-django-rest-framework %description -n python3-django-rest-framework-composed-permissions A simple way to define complex permissions for django-rest-framework. https://djangorestframework-composed-permissions.readthedocs.org/en/latest/ %endif %prep %autosetup -n %{distname}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif # Tests not included in the tarball. #%%check #%%{__python2} runtests.py #%%if 0%%{?with_python3} #%%{__python3} runtests.py #%%endif %files -n python2-django-rest-framework-composed-permissions %doc README.rst # Not included in tarball. #%license LICENSE %{python2_sitelib}/restfw_composed_permissions/ %{python2_sitelib}/djangorestframework_composed_permissions-%{version}* %if 0%{?with_python3} %files -n python3-django-rest-framework-composed-permissions %doc README.rst # Not included in tarball. #%license LICENSE %{python3_sitelib}/restfw_composed_permissions/ %{python3_sitelib}/djangorestframework_composed_permissions-%{version}* %endif %changelog * Tue Feb 07 2017 Ralph Bean - 0.1-1 - Initial package for Fedora