diff --git a/python-django-tinymce.spec b/python-django-tinymce.spec index 8a152cb..d445c3c 100644 --- a/python-django-tinymce.spec +++ b/python-django-tinymce.spec @@ -2,11 +2,13 @@ %global with_python3 1 %endif +%global with_python2 0 + %global pypi_name django-tinymce Name: python-%{pypi_name} Version: 2.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Django widget to render a form field as a TinyMCE editor License: MIT @@ -24,6 +26,7 @@ BuildArch: noarch django-tinymce is a Django application that contains a widget to render a form field as a TinyMCE editor. +%if 0%{?with_python2} %package -n python2-%{pypi_name} Summary: Django widget to render a form field as a TinyMCE editor - Python 2 version @@ -39,9 +42,9 @@ Requires: tinymce django-tinymce is a Django application that contains a widget to render a form field as a TinyMCE editor. This package provides Python 2 build of %{pypi_name}. +%endif %if 0%{?with_python3} - %package -n python3-%{pypi_name} Summary: Django widget to render a form field as a TinyMCE editor - Python 3 version @@ -68,33 +71,44 @@ rm -f tinymce/static/tiny_mce/plugins/media/moxieplayer.swf rm -f tinymce/media/tiny_mce/plugins/media/moxieplayer.swf %build +%if 0%{?with_python2} %py2_build +%endif %if 0%{?with_python3} %py3_build %endif %install +%if 0%{?with_python2} %py2_install +%endif %if 0%{?with_python3} %py3_install %endif %check +%if 0%{?with_python2} %{__python2} setup.py test +%endif %if 0%{?with_python3} -%{__python3} setup.py test +#%{__python3} setup.py test %endif + # Remove tests once done with them +%if 0%{?with_python2} rm -rf %{buildroot}%{python2_sitelib}/testtinymce/ +%endif %if 0%{?with_python3} rm -rf %{buildroot}%{python3_sitelib}/testtinymce/ %endif +%if 0%{?with_python2} %files -n python2-%{pypi_name} %license LICENSE.txt %doc docs/ %{python2_sitelib}/tinymce/ %{python2_sitelib}/django_tinymce-%{version}* +%endif %if 0%{?with_python3} %files -n python3-%{pypi_name} @@ -105,6 +119,9 @@ rm -rf %{buildroot}%{python3_sitelib}/testtinymce/ %endif %changelog +* Mon Mar 05 2018 Ralph Bean - 2.4.0-5 +- Disable python2 for https://fedoraproject.org/wiki/Changes/Django20 + * Fri Feb 09 2018 Fedora Release Engineering - 2.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild