diff --git a/.cvsignore b/.cvsignore index e69de29..e8c096a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +markdown-1.7.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..dd353ec --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +python-markdown-1_7-1_fc9:HEAD:python-markdown-1.7-1.fc9.src.rpm:1218525227 diff --git a/markdown b/markdown new file mode 100644 index 0000000..930561d --- /dev/null +++ b/markdown @@ -0,0 +1,14 @@ +#!/usr/bin/python +""" Run Markdown from the command line. """ + +import sys +from markdown import parse_options, markdownFromFile + +options = parse_options() + +#if os.access(inFile, os.R_OK): + +if not options: + sys.exit(0) + +markdownFromFile(**options) diff --git a/python-markdown.spec b/python-markdown.spec new file mode 100644 index 0000000..ff9fea5 --- /dev/null +++ b/python-markdown.spec @@ -0,0 +1,55 @@ +%{!?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: 1.7 +Release: 1%{?dist} +Summary: Markdown implementation in Python +Group: Development/Languages +License: GPLv2 or BSD +URL: http://www.freewisdom.org/projects/python-markdown/ +Source0: http://downloads.sourceforge.net/%{name}/%{srcname}-%{version}.tar.gz +Source1: markdown +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 shebang +%{__sed} -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' markdown.py + + +%build +%{__python} setup.py build + + +%install +rm -rf %{buildroot} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} +%{__install} -p -m 0755 -D %{SOURCE1} %{buildroot}%{_bindir}/markdown + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc CHANGE_LOG.txt README.txt README.html +%{python_sitelib}/* +%{_bindir}/markdown + + +%changelog +* Mon Aug 4 2008 Thomas Moschny - 1.7-1 +- New package. diff --git a/sources b/sources index e69de29..60d2773 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4297ebcdedc92b4bc7bc9ecd01053565 markdown-1.7.tar.gz