From d6e2cd9052abbe1ddeb7299057303b974bf000f8 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Aug 20 2016 17:49:08 +0000 Subject: update to version 2.3.0 - source update - modernized specfile with Python 3 packaging --- diff --git a/python-django-tinymce.spec b/python-django-tinymce.spec index 5cf8b6b..252ff56 100644 --- a/python-django-tinymce.spec +++ b/python-django-tinymce.spec @@ -1,54 +1,106 @@ -%global modname tinymce +%if 0%{?fedora} +%global with_python3 1 +%endif -Name: python-django-tinymce -Version: 1.5.3 -Release: 4%{?dist} +%global pypi_name django-tinymce + +Name: python-%{pypi_name} +Version: 2.3.0 +Release: 1%{?dist} Summary: Django widget to render a form field as a TinyMCE editor -Group: Development/Libraries License: MIT URL: http://pypi.python.org/pypi/django-tinymce -Source0: http://pypi.python.org/packages/source/d/django-tinymce/django-tinymce-%{version}.tar.gz -# Use system copy of tinymce by default, not the bundled one, for -# non-static configuration -Patch0: python-django-tinymce-1.5.2-unbundle_tinymce.patch +Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch +%description +django-tinymce is a Django application that contains a widget to render +a form field as a TinyMCE editor. + +%package -n python2-%{pypi_name} +Summary: Django widget to render a form field as a TinyMCE editor - Python 2 version + BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools +BuildRequires: python2-django +BuildRequires: python2-mock Requires: tinymce -%description +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} 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}. -%prep -%setup -q -n django-tinymce-%{version} -%patch0 -p1 -b .unbundle +%if 0%{?with_python3} + +%package -n python3-%{pypi_name} +Summary: Django widget to render a form field as a TinyMCE editor - Python 3 version + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-django +BuildRequires: python3-mock +Requires: tinymce -# Remove bundled egg-info in case it exists -rm -rf %{modname}.egg-info +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +django-tinymce is a Django application that contains a widget to render +a form field as a TinyMCE editor. +This package provides Python 3 build of %{pypi_name}. + +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} %build -%{__python} setup.py build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%{__python} setup.py install -O1 --skip-build --root=%{buildroot} - +%py2_install +%if 0%{?with_python3} +%py3_install +%endif %check -%{__python} setup.py test - +%{__python2} setup.py test +%if 0%{?with_python3} +%{__python3} setup.py test +%endif # Remove tests once done with them -rm -rf %{buildroot}%{python_sitelib}/testtinymce/ - -%files -%doc docs/ LICENSE.txt -%{python_sitelib}/%{modname}/ -%{python_sitelib}/django_tinymce-%{version}* +rm -rf %{buildroot}%{python2_sitelib}/testtinymce/ +%if 0%{?with_python3} +rm -rf %{buildroot}%{python3_sitelib}/testtinymce/ +%endif + +%files -n python2-%{pypi_name} +%license LICENSE.txt +%doc docs/ +%{python2_sitelib}/tinymce/ +%{python2_sitelib}/django_tinymce-%{version}* + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%license LICENSE.txt +%doc docs/ +%{python3_sitelib}/tinymce/ +%{python3_sitelib}/django_tinymce-%{version}* +%endif %changelog +* Wed Aug 17 2016 Jan Beran - 2.3.0-1 +- update to version 2.3.0 +- source update +- modernized specfile with Python 3 packaging + * Tue Jul 19 2016 Fedora Release Engineering - 1.5.3-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages @@ -70,3 +122,4 @@ rm -rf %{buildroot}%{python_sitelib}/testtinymce/ * Mon Feb 04 2013 Ralph Bean - 1.5.1b4-1 - Initial packaging for Fedora +