- update to new version
- remove patch (is upstream) - run tests differently
This commit is contained in:
parent
9454fd3220
commit
a0075cac9f
|
@ -1,2 +1,3 @@
|
||||||
/pyzmq-0.1.20100725git18f5d06.tar.xz
|
/pyzmq-0.1.20100725git18f5d06.tar.xz
|
||||||
/pyzmq-2.0.8.tar.gz
|
/pyzmq-2.0.8.tar.gz
|
||||||
|
/pyzmq-2.0.10.tar.gz
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
commit 12bca65badafebf0d45864b2011c32543be271d4
|
|
||||||
Author: Thomas Spura <tomspur@fedoraproject.org>
|
|
||||||
Date: Tue Aug 3 12:56:54 2010 +0200
|
|
||||||
|
|
||||||
s/os.path.walk/os.walk/g in python 3
|
|
||||||
|
|
||||||
When running python3, there is no os.path.walk() anymore.
|
|
||||||
It's renamed as os.walk(), so prefer the later and fall back to the
|
|
||||||
first.
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Spura <tomspur@fedoraproject.org>
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 6c765a6..2fe9055 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -30,7 +30,12 @@ from distutils.extension import Extension
|
|
||||||
|
|
||||||
from unittest import TextTestRunner, TestLoader
|
|
||||||
from glob import glob
|
|
||||||
-from os.path import splitext, basename, join as pjoin, walk
|
|
||||||
+from os.path import splitext, basename, join as pjoin
|
|
||||||
+
|
|
||||||
+try:
|
|
||||||
+ from os import walk
|
|
||||||
+except ImportError:
|
|
||||||
+ from os.path import walk
|
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
|
@ -3,16 +3,18 @@
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global _use_internal_dependency_generator 0
|
%{?filter_setup:
|
||||||
%global __find_provides %{_rpmconfigdir}/find-provides | grep -v _zmq.so
|
%filter_provides_in %{python_sitearch}/.*\.so$
|
||||||
|
%filter_setup
|
||||||
|
}
|
||||||
|
|
||||||
%global checkout 18f5d061558a176f5496aa8e049182c1a7da64f6
|
%global checkout 18f5d061558a176f5496aa8e049182c1a7da64f6
|
||||||
|
|
||||||
%global srcname pyzmq
|
%global srcname pyzmq
|
||||||
|
|
||||||
Name: python-zmq
|
Name: python-zmq
|
||||||
Version: 2.0.8
|
Version: 2.0.10
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Software library for fast, message-based applications
|
Summary: Software library for fast, message-based applications
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
@ -23,8 +25,7 @@ URL: http://www.zeromq.org/bindings:python
|
||||||
# git clone http://github.com/zeromq/pyzmq.git pyzmq.git
|
# git clone http://github.com/zeromq/pyzmq.git pyzmq.git
|
||||||
# cd pyzmq.git
|
# cd pyzmq.git
|
||||||
# git archive --format=tar --prefix=pyzmq-%%{version}/ %%{checkout} | xz -z --force - > pyzmq-%%{version}.tar.xz
|
# git archive --format=tar --prefix=pyzmq-%%{version}/ %%{checkout} | xz -z --force - > pyzmq-%%{version}.tar.xz
|
||||||
Source0: http://github.com/downloads/zeromq/pyzmq/pyzmq-%{version}.tar.gz
|
Source0: http://cloud.github.com/downloads/zeromq/pyzmq/pyzmq-%{version}.tar.gz
|
||||||
Patch0: python-zmq-os-walk.patch
|
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
@ -70,7 +71,6 @@ This package contains the python bindings.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
%patch0 -p1
|
|
||||||
# remove shebangs
|
# remove shebangs
|
||||||
for lib in zmq/eventloop/*.py; do
|
for lib in zmq/eventloop/*.py; do
|
||||||
sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
|
sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
|
||||||
|
@ -79,13 +79,12 @@ for lib in zmq/eventloop/*.py; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# remove excecutable bits
|
# remove excecutable bits
|
||||||
chmod -x examples/kernel/frontend.py
|
|
||||||
chmod -x examples/pubsub/topics_pub.py
|
chmod -x examples/pubsub/topics_pub.py
|
||||||
chmod -x examples/kernel/kernel.py
|
|
||||||
chmod -x examples/pubsub/topics_sub.py
|
chmod -x examples/pubsub/topics_sub.py
|
||||||
|
|
||||||
# delete hidden files
|
# delete hidden files
|
||||||
find examples -name '.*' | xargs rm -v
|
#find examples -name '.*' | xargs rm -v
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
|
@ -93,6 +92,7 @@ cp -a . %{py3dir}
|
||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||||
rm -r %{py3dir}/examples
|
rm -r %{py3dir}/examples
|
||||||
2to3 --write --nobackups %{py3dir}
|
2to3 --write --nobackups %{py3dir}
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,18 +129,22 @@ popd
|
||||||
|
|
||||||
%check
|
%check
|
||||||
rm zmq/__*
|
rm zmq/__*
|
||||||
pushd zmq
|
#pushd zmq
|
||||||
PYTHONPATH=%{buildroot}%{python_sitearch} nosetests
|
#PYTHONPATH=%{buildroot}%{python_sitearch} nosetests
|
||||||
popd
|
#popd
|
||||||
|
PYTHONPATH=%{buildroot}%{python_sitearch} \
|
||||||
|
%{__python} setup.py test
|
||||||
rm -r %{buildroot}%{python_sitearch}/zmq/tests
|
rm -r %{buildroot}%{python_sitearch}/zmq/tests
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
# there is no python3-nose yet
|
# there is no python3-nose yet
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
rm zmq/__*
|
rm zmq/__*
|
||||||
pushd zmq
|
#pushd zmq
|
||||||
#PYTHONPATH=%{buildroot}%{python3_sitearch} nosetests
|
#PYTHONPATH=%{buildroot}%{python3_sitearch} nosetests
|
||||||
popd
|
#popd
|
||||||
|
#PYTHONPATH=%{buildroot}%{python3_sitearch} \
|
||||||
|
# %{__python3} setup.py test
|
||||||
rm -r %{buildroot}%{python3_sitearch}/zmq/tests
|
rm -r %{buildroot}%{python3_sitearch}/zmq/tests
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
@ -164,6 +168,11 @@ popd
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 13 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.0.10-1
|
||||||
|
- update to new version
|
||||||
|
- remove patch (is upstream)
|
||||||
|
- run tests differently
|
||||||
|
|
||||||
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.8-2
|
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.8-2
|
||||||
- rebuild for newer python3
|
- rebuild for newer python3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue