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