python-markdown/python-markdown.spec
2009-04-28 07:56:52 +00:00

63 lines
1.5 KiB
RPMSpec

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define srcname Markdown
Name: python-markdown
Version: 2.0
Release: 1%{?dist}
Summary: Markdown implementation in Python
Group: Development/Languages
License: BSD
URL: http://www.freewisdom.org/projects/python-markdown/
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
%description
This is a Python implementation of John Gruber's Markdown. It is
almost completely compliant with the reference implementation, though
there are a few known issues.
%prep
%setup -q -n %{srcname}-%{version}
# remove shebangs
find markdown -type f -name '*.py' \
-exec sed -i -e '/^#!/{1D}' {} \;
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
mv %{buildroot}%{_bindir}/markdown{.py,}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc docs/*
%{python_sitelib}/*
%{_bindir}/markdown
%changelog
* Sat Apr 25 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
- Update to 2.0.
- Adjusted source URL.
- License is now BSD only.
- Upstream now provides a script to run markdown from the cmdline.
* Mon Aug 4 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.7-1
- New package.