[pyparsing] - 1.5.5 - use buildroot macro - fix wrong file end of line encoding - convert files to utf-8 - doc s

terjeros terjeros at fedoraproject.org
Mon Oct 25 12:18:43 UTC 2010


commit 05d7628fb342b4940cd0bfc1f65c021011b137f1
Author: Terje Røsten <terje.rosten at ntnu.no>
Date:   Mon Oct 25 14:18:40 2010 +0200

    - 1.5.5
    - use buildroot macro
    - fix wrong file end of line encoding
    - convert files to utf-8
    - doc subpackage
    - python3 subpackage
    - rpmlint clean

 .gitignore        |    1 +
 pyparsing-LICENSE |   20 -----------
 pyparsing.spec    |   99 ++++++++++++++++++++++++++++++++++++++++++++++------
 sources           |    2 +-
 4 files changed, 89 insertions(+), 33 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8fc9e1a..0e4f6de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 pyparsing-1.5.0.tar.gz
+/pyparsing-1.5.5.tar.gz
diff --git a/pyparsing.spec b/pyparsing.spec
index a4d3729..a58f55c 100644
--- a/pyparsing.spec
+++ b/pyparsing.spec
@@ -1,49 +1,124 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
 
 Name:           pyparsing
-Version:        1.5.0
-Release:        7%{?dist}
+Version:        1.5.5
+Release:        1%{?dist}
 Summary:        An object-oriented approach to text processing
-
 Group:          Development/Libraries
 License:        MIT
 URL:            http://pyparsing.wikispaces.com/
-Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-Source1:        pyparsing-LICENSE
+Source0:        http://downloads.sourceforge.net/pyparsing/pyparsing-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
 BuildRequires:  python-devel
+BuildRequires:  dos2unix
+BuildRequires:  glibc-common
+
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+%endif # if with_python3
 
 %description
 pyparsing is a module that can be used to easily and directly configure syntax
 definitions for any number of text parsing applications.
 
+%package doc
+Summary:        Documentation for pyparsing
+Group:          Development/Libraries
+
+%description doc
+The package contains documentation for pyparsing.
+
+%if 0%{?with_python3}
+%package -n python3-pyparsing
+Summary:        An object-oriented approach to text processing (Python 3 version)
+Group:          Development/Libraries
+
+%description -n python3-pyparsing
+pyparsing is a module that can be used to easily and directly configure syntax
+definitions for any number of text parsing applications.
+
+This is the Python 3 version.
+%endif # if with_python3
+
 %prep
 %setup -q
+mv docs/pyparsingClassDiagram.PNG docs/pyparsingClassDiagram.png
+rm docs/pyparsingClassDiagram.JPG
+dos2unix -k CHANGES LICENSE
+dos2unix -k docs/examples/*
+dos2unix -k docs/htmldoc/epydoc*
+for f in CHANGES docs/examples/{holaMundo.py,mozillaCalendarParser.py} ; do
+    mv $f $f.iso88591
+    iconv -f ISO-8859-1 -t UTF-8 -o $f $f.iso88591
+    touch -r $f.iso88591 $f
+    rm -f $f.iso88591
+done
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif # with_python3
 
 %build
 %{__python} setup.py build
-mv pyparsingClassDiagram.PNG pyparsingClassDiagram.png
-install -p -m 0644 %{SOURCE1} $RPM_BUILD_DIR/%{name}-%{version}/LICENSE
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+
+# Install python 3 first, so that python 2 gets precedence:
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
-%doc CHANGES docs examples HowToUsePyparsing.html htmldoc pyparsingClassDiagram.* README LICENSE
+%doc CHANGES README LICENSE
 %if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
 %{python_sitelib}/pyparsing*egg-info
 %endif
 %{python_sitelib}/pyparsing.py*
 
+%if 0%{?with_python3}
+%files -n python3-pyparsing
+%defattr(-,root,root,-)
+%doc CHANGES README LICENSE
+%{python3_sitelib}/pyparsing*egg-info
+%{python3_sitelib}/pyparsing.py*
+%endif # with_python3
+
+%files doc
+%defattr(-,root,root,-)
+%doc CHANGES README LICENSE docs/*
 
 %changelog
+* Thu Oct 21 2010 Terje Rosten <terje.rosten at ntnu.no> - 1.5.5-1
+- 1.5.5
+- use buildroot macro
+- fix wrong file end of line encoding
+- convert files to utf-8
+- doc subpackage
+- python3 subpackage
+- rpmlint clean
+
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 1.5.0-7
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 
diff --git a/sources b/sources
index 0228a63..dc89e66 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ee318f600fcf34966daeb1bf9bebda8c  pyparsing-1.5.0.tar.gz
+0beba391cba3082d7914c289bffa52ce  pyparsing-1.5.5.tar.gz


More information about the scm-commits mailing list