diff --git a/python-django-pyscss.spec b/python-django-pyscss.spec index 603bf24..233cb0d 100644 --- a/python-django-pyscss.spec +++ b/python-django-pyscss.spec @@ -1,62 +1,117 @@ +%if 0%{?fedora} +%global with_python3 1 +%endif %global pypi_name django-pyscss Name: python-%{pypi_name} Version: 2.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Makes it easier to use PySCSS in Django License: BSD URL: https://github.com/fusionbox/django-pyscss -Source0: https://github.com/fusionbox/django-pyscss/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + #Patch00: 0001-make-tests-succeed-on-Django-1.7.patch BuildArch: noarch -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: python-pillow +%description +A collection of tools for making it easier to use +pyScss within Django. + +%package -n python2-%{pypi_name} +Summary: Makes it easier to use PySCSS in Django - Python 2 version + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pillow BuildRequires: python-django-compressor >= 1.3 BuildRequires: python-django-discover-runner -BuildRequires: python-scss >= 1.2.0 -BuildRequires: python-django +BuildRequires: python2-scss >= 1.2.0 +BuildRequires: python2-django BuildRequires: python-pathlib BuildRequires: python-enum34 -BuildRequires: python-mock +BuildRequires: python2-mock -Requires: python-django >= 1.4 -Requires: python-scss >= 1.3.4 +Requires: python2-django >= 1.4 +Requires: python2-scss >= 1.3.4 Requires: python-pathlib Requires: python-enum34 -Provides: python2-%{pypi_name} = %{version}-%{release} +%{?python_provide:%python_provide python2-%{pypi_name}} -%description +%description -n python2-%{pypi_name} A collection of tools for making it easier to use pyScss within Django. +This package provides Python 2 build of %{pypi_name}. -%prep -%setup -q -n %{pypi_name}-%{version} +%if 0%{?with_python3} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info +%package -n python3-%{pypi_name} +Summary: Makes it easier to use PySCSS in Django - Python 3 version -%build -%{__python2} setup.py build +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pillow +BuildRequires: python3-django-compressor >= 1.3 +BuildRequires: python3-django-discover-runner +BuildRequires: python3-scss >= 1.2.0 +BuildRequires: python3-django +BuildRequires: python3-mock +Requires: python3-django >= 1.4 +Requires: python3-scss >= 1.3.4 + +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +A collection of tools for making it easier to use +pyScss within Django. +This package provides Python 3 build of %{pypi_name}. + +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%{__python2} setup.py install --skip-build --root %{buildroot} +%py2_install +%if 0%{?with_python3} +%py3_install +%endif %check %{__python2} setup.py test +%if 0%{?with_python3} +%{__python3} setup.py test +%endif - -%files -%doc README.rst LICENSE +%files -n python2-%{pypi_name} +%license LICENSE +%doc README.rst %{python2_sitelib}/django_pyscss %{python2_sitelib}/django_pyscss-%{version}-py?.?.egg-info +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/django_pyscss +%{python3_sitelib}/django_pyscss-%{version}-py?.?.egg-info +%endif + %changelog +* Wed Aug 3 2016 Jan Beran - 2.0.2-4 +- source update +- Python 3 subpackage + * Tue Jul 19 2016 Fedora Release Engineering - 2.0.2-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages @@ -84,3 +139,5 @@ rm -rf %{pypi_name}.egg-info * Tue Jul 08 2014 Matthias Runge - 1.0.1-1 - Initial package. + +