%global modname tinymce
Name: python-django-tinymce
Version: 1.5.3
Release: 2%{?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
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
Requires: tinymce
%description
django-tinymce is a Django application that contains a widget to render
a form field as a TinyMCE editor.
%prep
%setup -q -n django-tinymce-%{version}
%patch0 -p1 -b .unbundle
# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
%check
%{__python} setup.py test
# 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}*
%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Jan 14 2014 Adam Williamson <awilliam@redhat.com> - 1.5.2-1
- new upstream release 1.5.2
- drop (one) bundled tinymce, use system copy instead
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1b4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Feb 04 2013 Ralph Bean <rbean@redhat.com> - 1.5.1b4-1
- Initial packaging for Fedora