Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define srcname markdown2

Name:           python-%{srcname}
Version:        1.0.1.11
Release:        1%{?dist}
Summary:        A fast and complete Python implementation of Markdown
Group:          Development/Languages
License:        MIT
URL:            http://code.google.com/p/python-%{srcname}/
Source0:        http://pypi.python.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-pygments

%description
Markdown is a text-to-HTML filter; it translates an easy-to-read /
easy-to-write structured text format into HTML. Markdown's text format
is most similar to that of plain text email, and supports features
such as headers, emphasis, code blocks, blockquotes, and links.

This is a fast and complete Python implementation of the Markdown
spec.

For information about markdown itself, see
http://daringfireball.net/projects/markdown/


%prep
%setup0 -q -n %{srcname}-%{version}


%build
%{__python} setup.py build


%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

# remove shebangs and fix permissions
find %{buildroot}%{python_sitelib} \( -name '*.py' -o -name 'py.*' \) \
  -exec sed -i '1{/^#!/d}' {} \; \
  -exec chmod u=rw,go=r {} \;


%clean
rm -rf %{buildroot}


%check
cd test
%{__python} test.py


%files
%defattr(-,root,root,-)
%doc CHANGES.txt LICENSE.txt README.txt TODO.txt
%{python_sitelib}/*
%{_bindir}/markdown2


%changelog
* Wed Oct  1 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.1.11-1
- Update to 1.0.11, also fixes the syntax_color test for the latest
  Pygments (should fix FTBFS bug 465049).

* Fri Sep 26 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.1.10-1
- Update to 1.0.1.10.

* Fri Sep 12 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.1.9-1
- Update to 1.0.1.9.

* Thu Sep 11 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.1.8-1
- Update to 1.0.1.8.
- Simplify the cmdline wrapper.

* Tue Sep  9 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.1.7-1
- New package.