diff --git a/.cvsignore b/.cvsignore index 2690c55..a5c832d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -textile-2.1.3.tar.gz +textile-2.1.4.tar.gz diff --git a/README.textile b/README.textile new file mode 100644 index 0000000..4265e61 --- /dev/null +++ b/README.textile @@ -0,0 +1,34 @@ +h1. PyTextile + +PyTextile is a simple text to HTML converter. + +h2. Usage + +
+
+
+>>> import textile
+>>> textile.__version__
+'2.1.4'
+>>> s = """
+... _This_ is a *test.*
+...
+... * One
+... * Two
+... * Three
+...
+... Link to "Slashdot":http://slashdot.org/
+... """
+>>> html = textile.textile(s)
+>>> print html
+This is a test.
+
+ - One
+ - Two
+ - Three
+
+ Link to Slashdot
+
+>>>
+
+
diff --git a/import.log b/import.log
index 3451790..7ac5708 100644
--- a/import.log
+++ b/import.log
@@ -1 +1,2 @@
python-textile-2_1_3-1_fc10:HEAD:python-textile-2.1.3-1.fc10.src.rpm:1236762638
+python-textile-2_1_4-3_fc13:F-12:python-textile-2.1.4-3.fc13.src.rpm:1278142787
diff --git a/python-textile.spec b/python-textile.spec
index 0523f63..31c18e4 100644
--- a/python-textile.spec
+++ b/python-textile.spec
@@ -1,22 +1,21 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%define srcname textile
+%global srcname textile
Name: python-%{srcname}
-Version: 2.1.3
-Release: 2%{?dist}
+Version: 2.1.4
+Release: 3%{?dist}
Summary: A Humane Web Text Generator
Group: Development/Languages
License: BSD
URL: http://loopcore.com/python-textile
Source0: http://pypi.python.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz
+Source1: http://github.com/jsamsa/python-textile/raw/84bdad397c073fc9148696b7a6259021968e35fd/README.textile
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
-
-# FIXME: no package currently provides tidy,
-# could be mx (experimental) or uTidyLib.
+BuildRequires: python-nose
%description
Textile is a XHTML generator using a simple markup developed by Dean
@@ -25,20 +24,23 @@ MathML translation, Python code coloring and much more.
%prep
%setup -q -n %{srcname}-%{version}
+cp -a %SOURCE1 .
# remove the shebang
-sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' textile.py
+sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' textile/functions.py
%build
%{__python} setup.py build
-%{__python} textile.py README.textile > README.html
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
+PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} \
+ -c 'import textile; import sys; print textile.textile(sys.stdin.read())' \
+ < README.textile > README.html
%check
-PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} test/test.py
+nosetests
%clean
rm -rf %{buildroot}
@@ -49,6 +51,19 @@ rm -rf %{buildroot}
%{python_sitelib}/*
%changelog
+* Fri Apr 16 2010 Thomas Moschny