[python-zmq/el5: 5/5] Merge branch 'master' into el5
tomspur
tomspur at fedoraproject.org
Wed Dec 14 10:52:27 UTC 2011
commit 3c3aef6108464adbfee99bac8cfae49fc9c5644e
Merge: 63e7506 6d9942d
Author: Thomas Spura <thomas.spura at gmail.com>
Date: Wed Dec 14 11:52:04 2011 +0100
Merge branch 'master' into el5
Conflicts:
python-zmq.spec
- tests package requires main package
- filter python3 and python26 libs
python-zmq.spec | 22 ++++++++++++++++++++--
pythondeps.sh | 32 ++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)
---
diff --cc python-zmq.spec
index 766517e,504f0ef..a11fcfd
--- a/python-zmq.spec
+++ b/python-zmq.spec
@@@ -2,21 -2,14 +2,24 @@@
%global with_python3 1
%endif
-
+# el5 has python-2.4, but 2.5 is minimum, so build with python2.6:
+# http://lists.zeromq.org/pipermail/zeromq-dev/2010-November/007597.html
+%if ! ( 0%{?fedora} > 12 || 0%{?rhel} > 5)
+%global pybasever 2.6
+%global __python_ver 26
+%global __python %{_bindir}/python%{?pybasever}
+%global python python26
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%else
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$
+ %if 0%{?fedora} > 12 || 0%{?rhel} > 6
+ %filter_provides_in %{python3_sitearch}/.*\.so$
+ %endif
%filter_setup
}
+%endif
%global checkout 18f5d061558a176f5496aa8e049182c1a7da64f6
@@@ -38,19 -31,11 +41,27 @@@ URL: http://www.zeromq.org/b
# cd pyzmq.git
# git archive --format=tar --prefix=pyzmq-%%{version}/ %%{checkout} | xz -z --force - > pyzmq-%%{version}.tar.xz
Source0: http://cloud.github.com/downloads/zeromq/pyzmq/pyzmq-%{version}.tar.gz
+
++%if ! ( 0%{?fedora} > 12 || 0%{?rhel} > 5)
++# filtering the el5 way
++Source10: pythondeps.sh
++%global __python_requires %{SOURCE10}
++%global __python_provides %{SOURCE10}
++%endif
++
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%if ! ( 0%{?fedora} > 12 || 0%{?rhel} > 5)
+BuildRequires: python26-devel
+BuildRequires: python26-distribute
+BuildRequires: python26-nose
+%else
BuildRequires: python2-devel
BuildRequires: python-setuptools
-BuildRequires: zeromq-devel
BuildRequires: python-nose
+%endif
+
+BuildRequires: zeromq-devel
%if 0%{?with_python3}
BuildRequires: python3-devel
@@@ -97,11 -60,8 +108,13 @@@ This package contains the python bindin
Summary: Software library for fast, message-based applications
Group: Development/Libraries
License: LGPLv3+
+%if ! ( 0%{?fedora} > 12 || 0%{?rhel} > 5)
++Requires: python26-zmq = %{version}-%{release}
+%description -n python26-zmq-tests
+%else
+ Requires: python-zmq = %{version}-%{release}
%description tests
+%endif
The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialized messaging middle-ware products. 0MQ sockets provide an
@@@ -254,10 -207,12 +268,14 @@@ pop
%changelog
+ * Wed Dec 14 2011 Thomas Spura <tomspur at fedoraproject.org> - 2.1.9-3
+ - tests package requires main package
-- filter python3 libs
++- filter python3 and python26 libs
+
* Thu Dec 8 2011 Thomas Spura <tomspur at fedoraproject.org> - 2.1.9-2
- use proper buildroot macro
+- use python2.6 on el5 and below (only build intended for el5)
+- build python26-zmq and ignore python-zmq packages on el5
- don't include tests twice
* Wed Sep 21 2011 Thomas Spura <tomspur at fedoraproject.org> - 2.1.9-1
diff --cc pythondeps.sh
index 0000000,0000000..10a060a
new file mode 100755
--- /dev/null
+++ b/pythondeps.sh
@@@ -1,0 -1,0 +1,32 @@@
++#!/bin/bash
++
++[ $# -ge 1 ] || {
++ cat > /dev/null
++ exit 0
++}
++
++case $1 in
++-P|--provides)
++ shift
++ # Match buildroot/payload paths of the form
++ # /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR
++ # generating a line of the form
++ # python(abi) = MAJOR.MINOR
++ # (Don't match against -config tools e.g. /usr/bin/python2.6-config)
++ grep "/usr/bin/python.\..$" \
++ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
++ ;;
++-R|--requires)
++ shift
++ # Match buildroot paths of the form
++ # /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and
++ # /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
++ # generating (uniqely) lines of the form:
++ # python(abi) = MAJOR.MINOR
++ grep "/usr/lib[^/]*/python.\../.*" \
++ | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
++ | sort | uniq
++ ;;
++esac
++
++exit 0
More information about the scm-commits
mailing list