diff --git a/python-pygments.spec b/python-pygments.spec index a108a87..6866f64 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -4,7 +4,7 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} %endif -%if 0%{?el5} +%if 0%{?rhel} == 5 %global with_python26 1 %endif @@ -12,9 +12,9 @@ %global __python26 %{_bindir}/python2.6 %global py26dir %{_builddir}/python26-%{name}-%{version}-%{release} %{!?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 +# Update rpm byte compilation script so that we get the modules compiled by the +# correct inerpreter +%global __os_install_post %__multiple_python_os_install_post %endif @@ -22,7 +22,7 @@ Name: python-pygments Version: 1.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Syntax highlighting engine written in Python Group: Development/Libraries @@ -157,18 +157,6 @@ 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 - -%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 - %clean rm -rf $RPM_BUILD_ROOT @@ -177,10 +165,19 @@ rm -rf $RPM_BUILD_ROOT %check make test -# nose is not Python3 ready yet +%if 0%{?with_python26} +pushd %{py26dir} +# There's currently no python26-nose +#make test +popd +%endif # with_python26 + +# python3-nose is available from f15 on %if 0%{?with_python3} pushd %{py3dir} -#make test +%if 0%{?fedora} >= 15 +make test +%endif popd %endif # with_python3 @@ -209,6 +206,10 @@ popd %changelog +* Tue Sep 13 2011 Toshio Kuratomi - 1.4-3 +- Really enable the python3 unittests. +- Fix python26 byte compilation (thanks to Jeffrey Ness) + * 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