Blame SPECS/pyparsing.spec

9eb96c
%if 0%{?fedora} > 12
9eb96c
%global with_python3 1
9eb96c
%else
9eb96c
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
9eb96c
%endif
9eb96c
9eb96c
Name:           pyparsing
9eb96c
Version:        1.5.6
9eb96c
Release:        8%{?dist}
9eb96c
Summary:        An object-oriented approach to text processing
9eb96c
Group:          Development/Libraries
9eb96c
License:        MIT
9eb96c
URL:            http://pyparsing.wikispaces.com/
9eb96c
Source0:        http://downloads.sourceforge.net/pyparsing/pyparsing-%{version}.tar.gz
9eb96c
Patch0:         pyparsing-1.5.6-traceback-typo.patch
9eb96c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9eb96c
BuildArch:      noarch
9eb96c
9eb96c
BuildRequires:  python-devel
9eb96c
BuildRequires:  dos2unix
9eb96c
BuildRequires:  glibc-common
9eb96c
9eb96c
%if 0%{?with_python3}
9eb96c
BuildRequires: python3-devel
9eb96c
%endif # if with_python3
9eb96c
9eb96c
%description
9eb96c
pyparsing is a module that can be used to easily and directly configure syntax
9eb96c
definitions for any number of text parsing applications.
9eb96c
9eb96c
%package doc
9eb96c
Summary:        Documentation for pyparsing
9eb96c
Group:          Development/Libraries
9eb96c
9eb96c
%description doc
9eb96c
The package contains documentation for pyparsing.
9eb96c
9eb96c
%if 0%{?with_python3}
9eb96c
%package -n python3-pyparsing
9eb96c
Summary:        An object-oriented approach to text processing (Python 3 version)
9eb96c
Group:          Development/Libraries
9eb96c
9eb96c
%description -n python3-pyparsing
9eb96c
pyparsing is a module that can be used to easily and directly configure syntax
9eb96c
definitions for any number of text parsing applications.
9eb96c
9eb96c
This is the Python 3 version.
9eb96c
%endif # if with_python3
9eb96c
9eb96c
%prep
9eb96c
%setup -q
9eb96c
dos2unix -k pyparsing_py3.py
9eb96c
%patch0
9eb96c
mv docs/pyparsingClassDiagram.PNG docs/pyparsingClassDiagram.png
9eb96c
rm docs/pyparsingClassDiagram.JPG
9eb96c
dos2unix -k CHANGES LICENSE
9eb96c
dos2unix -k docs/examples/*
9eb96c
dos2unix -k docs/htmldoc/epydoc*
9eb96c
for f in CHANGES docs/examples/{holaMundo.py,mozillaCalendarParser.py} ; do
9eb96c
    mv $f $f.iso88591
9eb96c
    iconv -f ISO-8859-1 -t UTF-8 -o $f $f.iso88591
9eb96c
    touch -r $f.iso88591 $f
9eb96c
    rm -f $f.iso88591
9eb96c
done
9eb96c
9eb96c
%if 0%{?with_python3}
9eb96c
rm -rf %{py3dir}
9eb96c
cp -a . %{py3dir}
9eb96c
%endif # with_python3
9eb96c
9eb96c
%build
9eb96c
%{__python} setup.py build
9eb96c
9eb96c
%if 0%{?with_python3}
9eb96c
pushd %{py3dir}
9eb96c
%{__python3} setup.py build
9eb96c
popd
9eb96c
%endif # with_python3
9eb96c
9eb96c
%install
9eb96c
rm -rf %{buildroot}
9eb96c
9eb96c
# Install python 3 first, so that python 2 gets precedence:
9eb96c
%if 0%{?with_python3}
9eb96c
pushd %{py3dir}
9eb96c
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
9eb96c
popd
9eb96c
%endif # with_python3
9eb96c
9eb96c
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
9eb96c
9eb96c
%clean
9eb96c
rm -rf %{buildroot}
9eb96c
9eb96c
%files
9eb96c
%defattr(-,root,root,-)
9eb96c
%doc CHANGES README LICENSE
9eb96c
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
9eb96c
%{python_sitelib}/pyparsing*egg-info
9eb96c
%endif
9eb96c
%{python_sitelib}/pyparsing.py*
9eb96c
9eb96c
%if 0%{?with_python3}
9eb96c
%files -n python3-pyparsing
9eb96c
%defattr(-,root,root,-)
9eb96c
%doc CHANGES README LICENSE
9eb96c
%{python3_sitelib}/pyparsing*egg-info
9eb96c
%{python3_sitelib}/pyparsing.py*
9eb96c
%endif # with_python3
9eb96c
%if ( 0%{?fedora} >= 15 || 0%{?rhel} >= 7 ) && 0%{?with_python3}
9eb96c
%{python3_sitelib}/__pycache__/pyparsing*
9eb96c
%endif # pycache
9eb96c
9eb96c
%files doc
9eb96c
%defattr(-,root,root,-)
9eb96c
%doc CHANGES README LICENSE docs/*
9eb96c
9eb96c
%changelog
9eb96c
* Wed Apr  3 2013 Thomas Spura <tomspur@fedoraproject.org> - 1.5.6-8
9eb96c
- add patch to correct typo in exception handling
9eb96c
9eb96c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-7
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9eb96c
9eb96c
* Fri Aug 03 2012 David Malcolm <dmalcolm@redhat.com> - 1.5.6-6
9eb96c
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
9eb96c
9eb96c
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 1.5.6-5
9eb96c
- remove rhel logic from with_python3 conditional
9eb96c
9eb96c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-4
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9eb96c
9eb96c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-3
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9eb96c
9eb96c
* Tue Dec  6 2011 David Malcolm <dmalcolm@redhat.com> - 1.5.6-2
9eb96c
- fix __pycache__ conditional on RHEL
9eb96c
9eb96c
* Fri Jul  1 2011 José Matos <jamatos@fedoraproject.org> - 1.5.6-1
9eb96c
- New upstream version.
9eb96c
9eb96c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.5-2
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9eb96c
9eb96c
* Thu Oct 21 2010 Terje Rosten <terje.rosten@ntnu.no> - 1.5.5-1
9eb96c
- 1.5.5
9eb96c
- use buildroot macro
9eb96c
- fix wrong file end of line encoding
9eb96c
- convert files to utf-8
9eb96c
- doc subpackage
9eb96c
- python3 subpackage
9eb96c
- rpmlint clean
9eb96c
9eb96c
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.5.0-7
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
9eb96c
9eb96c
* Fri Jul 16 2010 Dan Horák <dan[at]danny.cz> - 1.5.0-6
9eb96c
- include egginfo on EL >= 6
9eb96c
9eb96c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-5
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9eb96c
9eb96c
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-4
9eb96c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9eb96c
9eb96c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.5.0-3
9eb96c
- Rebuild for Python 2.6
9eb96c
9eb96c
* Mon Aug  4 2008 José Matos <jamatos[AT]fc.up.pt> - 1.5.0-2
9eb96c
- respun (now with the right sources)
9eb96c
9eb96c
* Mon Aug  4 2008 José Matos <jamatos[AT]fc.up.pt> - 1.5.0-1
9eb96c
- new upstream release.
9eb96c
9eb96c
* Tue Apr  1 2008 José Matos <jamatos[AT]fc.up.pt> - 1.4.11-1
9eb96c
- New upstream version, add egg-info for F9+.
9eb96c
9eb96c
* Wed Aug 29 2007 José Matos <jamatos[AT]fc.up.pt> - 1.4.7-1
9eb96c
- New upstream version.
9eb96c
9eb96c
* Sat Apr 21 2007 José Matos <jamatos[AT]fc.up.pt> - 1.4.6-1
9eb96c
- New upstream version.
9eb96c
9eb96c
* Mon Dec 11 2006 José Matos <jamatos[AT]fc.up.pt> - 1.4.4-1
9eb96c
- New upstream version.
9eb96c
9eb96c
* Mon Sep 11 2006 José Matos <jamatos[AT]fc.up.pt> - 1.4.3-1
9eb96c
- New version.
9eb96c
9eb96c
* Wed Aug  3 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.3-1
9eb96c
- Initial RPM release