Really enable the python3 unittests.
Fix python26 byte compilation (thanks to Jeffrey Ness)
This commit is contained in:
parent
761a8b0a8b
commit
1e0e5cbd1c
@ -4,7 +4,7 @@
|
|||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?el5}
|
%if 0%{?rhel} == 5
|
||||||
%global with_python26 1
|
%global with_python26 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -12,9 +12,9 @@
|
|||||||
%global __python26 %{_bindir}/python2.6
|
%global __python26 %{_bindir}/python2.6
|
||||||
%global py26dir %{_builddir}/python26-%{name}-%{version}-%{release}
|
%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())")}
|
%{!?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
|
# Update rpm byte compilation script so that we get the modules compiled by the
|
||||||
# FIXME:: ATM, it looks like byte compilation will either be broken for the py2.4 or py2.6 subpackage.
|
# correct inerpreter
|
||||||
# Unless a fix is discovered, I'd advise making a separate package for python26 module
|
%global __os_install_post %__multiple_python_os_install_post
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
Name: python-pygments
|
Name: python-pygments
|
||||||
Version: 1.4
|
Version: 1.4
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Syntax highlighting engine written in Python
|
Summary: Syntax highlighting engine written in Python
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -157,18 +157,6 @@ mv build html
|
|||||||
mv src reST
|
mv src reST
|
||||||
popd
|
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
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -177,10 +165,19 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%check
|
%check
|
||||||
make test
|
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}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
#make test
|
%if 0%{?fedora} >= 15
|
||||||
|
make test
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
@ -209,6 +206,10 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-3
|
||||||
|
- Really enable the python3 unittests.
|
||||||
|
- Fix python26 byte compilation (thanks to Jeffrey Ness)
|
||||||
|
|
||||||
* Sat Sep 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
|
* Sat Sep 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
|
||||||
- Fix python main package having dependencies for the python2.6 subpackage
|
- Fix python main package having dependencies for the python2.6 subpackage
|
||||||
- Fix places that used the default python instead of python26
|
- Fix places that used the default python instead of python26
|
||||||
|
Loading…
Reference in New Issue
Block a user