Blob Blame 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}
Release:        1%{?dist}
Summary:        A fast and complete Python implementation of Markdown
Group:          Development/Languages
License:        MIT
URL:  {srcname}/
Source1:        markdown2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-pygments

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

For information about markdown itself, see

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

%{__python} build

rm -rf %{buildroot}
%{__python} 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 {} \;

# overwrite the script (which is self-contained) with a version that
# instead imports from markdown2
install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}

rm -rf %{buildroot}

cd test

%doc CHANGES.txt LICENSE.txt README.txt TODO.txt

* Thu Sep 11 2008 Thomas Moschny <> -
- Update to
- Simplify the cmdline wrapper.

* Tue Sep  9 2008 Thomas Moschny <> -
- New package.