From 761a8b0a8b3abd30269cc118fc0c9f7777b000ee Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sep 13 2011 00:43:53 +0000 Subject: Merge branch 'master' into el5 --- diff --git a/python-pygments.spec b/python-pygments.spec index f5bb811..a108a87 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -11,8 +11,10 @@ %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. +%{!?python26_sitelib: %global python26_sitelib %(%{__python26} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +# Disable byte compiling and do it with our script copied from Fedora 14/EL6 +# FIXME:: ATM, it looks like byte compilation will either be broken for the py2.4 or py2.6 subpackage. +# Unless a fix is discovered, I'd advise making a separate package for python26 module %endif @@ -20,8 +22,8 @@ Name: python-pygments Version: 1.4 -Release: 1%{?dist} -Summary: A syntax highlighting engine written in Python +Release: 2%{?dist} +Summary: Syntax highlighting engine written in Python Group: Development/Libraries License: BSD @@ -33,12 +35,13 @@ BuildArch: noarch BuildRequires: python2-devel >= 2.4, python-setuptools, python-nose %if 0%{?with_python3} BuildRequires: python3-devel, python3-setuptools +%if 0%{?fedora} >= 15 +BuildRequires: python3-nose +%endif %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 @@ -59,7 +62,7 @@ need to prettify source code. Highlights are: %if 0%{?with_python3} %package -n python3-pygments -Summary: A syntax highlighting engine written in Python 3 +Summary: Syntax highlighting engine written in Python 3 Group: Development/Libraries Requires: python3-setuptools @@ -84,6 +87,8 @@ need to prettify source code. Highlights are: Summary: A syntax highlighting engine written in Python 2.6 Group: Development/Libraries Requires: python26-distribute +Requires: python26-imaging +Requires: python(abi) = 2.6 %description -n python26-pygments Pygments is a generic syntax highlighter for general use in all kinds @@ -157,6 +162,11 @@ popd %{__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 + +%if 0%{?with_python3} +%{__python3} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python3_sitelib}", 1)' > /dev/null +%{__python3} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"10"', "%{python3_sitelib}", 1)' > /dev/null +%endif %endif @@ -199,6 +209,12 @@ popd %changelog +* Sat Sep 10 2011 Toshio Kuratomi - 1.4-2 +- Fix python main package having dependencies for the python2.6 subpackage +- Fix places that used the default python instead of python26 +- Attempt to make byte compilation more robust in case we add python3 to EPEL5 +- Run unittests on python3 in F15+ + * Fri Jun 24 2011 Steve Milner - 1.4-1 - update for upstream release - Add python2.6 support done by Steve Traylen . BZ#662755.