added EL5 py2.6 and updated to 1.4

This commit is contained in:
Steve Milner 2011-06-24 10:18:29 -04:00
parent 5a670f80e0
commit 612557d701
3 changed files with 71 additions and 3 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
Pygments-1.3.1.tar.gz
/Pygments-1.4.tar.gz

View File

@ -4,11 +4,23 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
%if 0%{?el5}
%global with_python26 1
%endif
%if 0%{?with_python26}
%global __python26 %{_bindir}/python2.6
%global py26dir %{_builddir}/python26-%{name}-%{version}-%{release}
%global python26_sitelib %{_libdir}/python2.6/site-packages
#Disable byte compileing and do ourselves later.
%endif
%global upstream_name Pygments
Name: python-pygments
Version: 1.3.1
Release: 7%{?dist}
Version: 1.4
Release: 1%{?dist}
Summary: A syntax highlighting engine written in Python
Group: Development/Libraries
@ -23,6 +35,11 @@ BuildRequires: python2-devel >= 2.4, python-setuptools, python-nose
BuildRequires: python3-devel, python3-setuptools
%endif # if with_python3
Requires: python-setuptools, python-imaging
%if 0%{?with_python26}
BuildRequires: python26-devel, python26-distribute
Requires: python26-distribute, python26-imaging
Requires: python(abi) = 2.6
%endif
%description
@ -62,6 +79,18 @@ need to prettify source code. Highlights are:
* ... and it highlights even Brainf*ck!
%endif # if with_python3
%if 0%{?with_python26}
%package -n python26-pygments
Summary: A syntax highlighting engine written in Python 2.6
Group: Development/Libraries
Requires: python26-distribute
%description -n python26-pygments
Pygments is a generic syntax highlighter for general use in all kinds
of software such as forum systems, wikis or other applications that
need to prettify source code. Highlights are:
%endif #end of python2.6
%prep
%setup -q -n Pygments-%{version}
@ -72,6 +101,12 @@ cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3
%if 0%{?with_python26}
rm -rf %{py26dir}
cp -a . %{py26dir}
find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python26}|'
%endif # with_python26
%build
%{__python} setup.py build
@ -83,6 +118,12 @@ pushd %{py3dir}
popd
%endif # with_python3
%if 0%{?with_python26}
pushd %{py26dir}
%{__python26} setup.py build
popd
%endif # with_python26
%install
rm -rf $RPM_BUILD_ROOT
@ -95,6 +136,14 @@ pushd %{py3dir}
popd
%endif # with_python3
# Run the Python 2.6 build first so that the Python 2 version of
# /usr/bin/pygmentize "wins":
%if 0%{?with_python26}
pushd %{py26dir}
%{__python26} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif # with_python26
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
pushd docs
install -d %{buildroot}%{_mandir}/man1
@ -103,6 +152,13 @@ mv build html
mv src reST
popd
%if 0%{?with_python26}
%{__python} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python_sitelib}", 1)' > /dev/null
%{__python} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python_sitelib}", 1)' > /dev/null
%{__python26} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python26_sitelib}", 1)' > /dev/null
%{__python26} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python26_sitelib}", 1)' > /dev/null
%endif
%clean
rm -rf $RPM_BUILD_ROOT
@ -134,8 +190,19 @@ popd
%{python3_sitelib}/*
%endif # with_python3
%if 0%{?with_python26}
%files -n python26-pygments
%defattr(-,root,root,-)
%doc AUTHORS CHANGES docs/ LICENSE TODO
%{python26_sitelib}/*
%endif # with_python26
%changelog
* Fri Jun 24 2011 Steve Milner <smilner@fedoraproject.org> - 1.4-1
- update for upstream release
- Add python2.6 support done by Steve Traylen <steve.traylen@cern.ch>. BZ#662755.
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
- update to most recent python guidelines
- rebuild with python3.2

View File

@ -1 +1 @@
54be67c04834f13d7e255e1797d629a5 Pygments-1.3.1.tar.gz
d77ac8c93a7fb27545f2522abe9cc462 Pygments-1.4.tar.gz