%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global srcname textile
Name: python-%{srcname}
Version: 2.1.4
Release: 6%{?dist}
Summary: A Humane Web Text Generator
Group: Development/Languages
License: BSD
URL: http://loopcore.com/python-textile
Source0: http://pypi.python.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz
Source1: http://github.com/jsamsa/python-textile/raw/84bdad397c073fc9148696b7a6259021968e35fd/README.textile
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
BuildRequires: python-nose
%description
Textile is a XHTML generator using a simple markup developed by Dean
Allen. This is a Python port with support for code validation, itex to
MathML translation, Python code coloring and much more.
%prep
%setup -q -n %{srcname}-%{version}
cp -a %SOURCE1 .
# remove the shebang
sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' textile/functions.py
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} \
-c 'import textile; import sys; print textile.textile(sys.stdin.read())' \
< README.textile > README.html
%check
nosetests
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.*
%{python_sitelib}/*
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.1.4-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Fri Apr 16 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.4-3
- Simplify %%check.
* Fri Apr 16 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.4-2
- Add missing BR python-nose for the tests.
- Actually run the tests in %%check.
- Remove obsolete comment about tidy.
* Fri Apr 16 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.4-1
- Update to 2.1.4.
- Use %%global instead of %%define.
- README is missing in the tarfile.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Mar 11 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.3-1
- Upstream and upstream URLs changed.
- Update to 2.1.3.
- Remove now obsolete tweak for enabling import of htmlizer.
- Process README.textile provided in the package.
- Run test.py in %%check section.
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0.11-5
- Rebuild for Python 2.6
* Sat Apr 5 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.11-4
- Simplify BR.
* Mon Jan 28 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.11-3
- As the license text in the main source file is unchanged, revert the
license tag back to BSD.
* Fri Jan 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.11-2
- Updated main and source urls. The website states that the package is
now under the MIT License.
* Tue Sep 8 2007 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.11-1
- Initial version.