%if 0%{?fedora} %global with_python3 1 %endif %{!?_licensedir: %global license %%doc} %global modname django-cors-headers Name: python-django-cors-headers Version: 1.1.0 Release: 2%{?dist} Summary: A Django application for handling the CORS headers Group: Development/Libraries License: MIT URL: http://pypi.python.org/pypi/django-cors-headers Source0: https://pypi.python.org/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-mock %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-mock %endif %description django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). %package -n python2-%{modname} Summary: django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). %{?python_provide:%python_provide python2-%{modname}} %description -n python2-%{modname} django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). %if 0%{?with_python3} %package -n python3-%{modname} Summary: django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). %{?python_provide:%python_provide python3-%{modname}} %description -n python3-%{modname} django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS). %endif %prep %autosetup -n %{modname}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %files -n python2-%{modname} %{python2_sitelib}/corsheaders/ %{python2_sitelib}/django_cors_headers-%{version}* %if 0%{?with_python3} %files -n python3-%{modname} %{python3_sitelib}/corsheaders/ %{python3_sitelib}/django_cors_headers-%{version}* %endif %changelog * Mon Jan 18 2016 Ralph Bean - 1.1.0-2 - Initial packaging for Fedora.