%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define srcname textile
Name: python-%{srcname}
Version: 2.0.11
Release: 4%{?dist}
Summary: A Humane Web Text Generator
Group: Development/Languages
License: BSD
URL: http://code.google.com/p/pytextile/
Source0: http://pytextile.googlecode.com/files/%{srcname}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
# for htmlizer:
Requires(missingok): python-twisted-core
# FIXME: no package currently provides tidy,
# could be mx (experimental) or uTidyLib.
%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}
# small fixes:
# - toggle import statement for htmlizer
# - remove the shebang
sed -i -e 's/^\( *\)\(import htmlizer\)/\1#\2/' \
-e 's/^\( *\)#\(from twisted.python import htmlizer\)/\1\2/' \
-e '/#! *\/usr\/bin\/.*python.*/{1D}' textile.py
%build
%{__python} setup.py build
# calling textile directly yields a single overview page
%{__python} textile.py > overview.html
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc overview.html
%{python_sitelib}/*
%changelog
* 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.