%if 0%{?fedora}
%global with_python3 1
%endif
%global pypi_name django-pyscss
Name: python-%{pypi_name}
Version: 2.0.2
Release: 4%{?dist}
Summary: Makes it easier to use PySCSS in Django
License: BSD
URL: https://github.com/fusionbox/django-pyscss
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
%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: python2-scss >= 1.2.0
BuildRequires: python2-django
BuildRequires: python-pathlib
BuildRequires: python-enum34
BuildRequires: python2-mock
Requires: python2-django >= 1.4
Requires: python2-scss >= 1.3.4
Requires: python-pathlib
Requires: python-enum34
%{?python_provide:%python_provide python2-%{pypi_name}}
%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}.
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: Makes it easier to use PySCSS in Django - Python 3 version
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
%py2_install
%if 0%{?with_python3}
%py3_install
%endif
%check
%{__python2} setup.py test
%if 0%{?with_python3}
%{__python3} setup.py test
%endif
%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 <jberan@redhat.com> - 2.0.2-4
- source update
- Python 3 subpackage
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jul 13 2015 Matthias Runge <mrunge@redhat.com> - 2.0.2-1
- fix FTBFS and update (rhbz#1239832)
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Oct 17 2014 Matthias Runge <mrunge@redhat.com> - 1.0.5-1
- update to 1.0.5
- fix tests and utils.py to work with Django-1.7
* Fri Sep 26 2014 Matthias Runge <mrunge@redhat.com> - 1.0.3-1
- update to 1.0.3
* Thu Aug 07 2014 Matthias Runge <mrunge@redhat.com> - 1.0.2-1
- update to 1.0.2
* Tue Jul 08 2014 Matthias Runge <mrunge@redhat.com> - 1.0.1-2
- add br python-setuptools
* Tue Jul 08 2014 Matthias Runge <mrunge@redhat.com> - 1.0.1-1
- Initial package.