89045df
%if 0%{?fedora}
89045df
%global with_python3 1
89045df
%endif
89045df
89045df
%{!?_licensedir: %global license %%doc}
89045df
89045df
%global modname django-cors-headers
89045df
89045df
Name:               python-django-cors-headers
89045df
Version:            2.0.2
89045df
Release:            2%{?dist}
89045df
Summary:            A Django application for handling CORS headers
89045df
89045df
Group:              Development/Libraries
89045df
License:            MIT
89045df
URL:                https://pypi.io/project/django-cors-headers
89045df
Source0:            https://pypi.io/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz
89045df
BuildArch:          noarch
89045df
89045df
BuildRequires:      python2-devel
89045df
BuildRequires:      python-setuptools
89045df
BuildRequires:      python-mock
89045df
89045df
%if 0%{?with_python3}
89045df
BuildRequires:      python3-devel
89045df
BuildRequires:      python3-setuptools
89045df
BuildRequires:      python3-mock
89045df
%endif
89045df
89045df
%description
89045df
django-cors-headers is a Django application for handling the server headers
89045df
required for Cross-Origin Resource Sharing (CORS).
89045df
89045df
%package -n python2-%{modname}
89045df
Summary:            A Django application for handling CORS headers
89045df
%{?python_provide:%python_provide python2-%{modname}}
89045df
89045df
%description -n python2-%{modname}
89045df
django-cors-headers is a Django application for handling the server headers
89045df
required for Cross-Origin Resource Sharing (CORS).
89045df
89045df
%if 0%{?with_python3}
89045df
%package -n python3-%{modname}
89045df
Summary:            A Django application for handling CORS headers
89045df
%{?python_provide:%python_provide python3-%{modname}}
89045df
89045df
%description -n python3-%{modname}
89045df
django-cors-headers is a Django application for handling the server headers
89045df
required for Cross-Origin Resource Sharing (CORS).
89045df
%endif
89045df
89045df
%prep
89045df
%autosetup -n %{modname}-%{version}
89045df
89045df
%build
89045df
%py2_build
89045df
%if 0%{?with_python3}
89045df
%py3_build
89045df
%endif
89045df
89045df
%install
89045df
%py2_install
89045df
%if 0%{?with_python3}
89045df
%py3_install
89045df
%endif
89045df
89045df
%files -n python2-%{modname}
89045df
%doc README.rst HISTORY.rst
89045df
%license LICENSE.txt
89045df
%{python2_sitelib}/corsheaders/
89045df
%{python2_sitelib}/django_cors_headers-%{version}*
89045df
89045df
%if 0%{?with_python3}
89045df
%files -n python3-%{modname}
89045df
%doc README.rst HISTORY.rst
89045df
%license LICENSE.txt
89045df
%{python3_sitelib}/corsheaders/
89045df
%{python3_sitelib}/django_cors_headers-%{version}*
89045df
%endif
89045df
89045df
%changelog
89045df
* Tue Feb 28 2017 Ralph Bean <rbean@redhat.com> - 2.0.2-2
89045df
- Add missing doc and license declarations.
89045df
89045df
* Fri Feb 10 2017 Ralph Bean <rbean@redhat.com> - 2.0.2-1
89045df
- Latest upstream.
89045df
89045df
* Mon Jan 18 2016 Ralph Bean <rbean@redhat.com> - 1.1.0-2
89045df
- Initial packaging for Fedora.