[python-pygments] Fix python main package having dependencies for the python2.6 subpackage Fix places that used the de
Toshio くらとみ
toshio at fedoraproject.org
Tue Sep 13 00:43:40 UTC 2011
commit 63ac05e5b7243fdca5ed7bf56a35a48045137dd6
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Mon Sep 12 17:43:19 2011 -0700
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+
python-pygments.spec | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
---
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 <toshio at fedoraproject.org> - 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 <smilner at fedoraproject.org> - 1.4-1
- update for upstream release
- Add python2.6 support done by Steve Traylen <steve.traylen at cern.ch>. BZ#662755.
More information about the scm-commits
mailing list