- update to new version

- remove patch (is upstream)
- run tests differently
This commit is contained in:
Thomas Spura 2011-01-18 23:11:13 +01:00
parent 9454fd3220
commit a0075cac9f
4 changed files with 26 additions and 46 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/pyzmq-0.1.20100725git18f5d06.tar.xz
/pyzmq-2.0.8.tar.gz
/pyzmq-2.0.10.tar.gz

View File

@ -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
#-----------------------------------------------------------------------------

View File

@ -3,16 +3,18 @@
%endif
%global _use_internal_dependency_generator 0
%global __find_provides %{_rpmconfigdir}/find-provides | grep -v _zmq.so
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$
%filter_setup
}
%global checkout 18f5d061558a176f5496aa8e049182c1a7da64f6
%global srcname pyzmq
Name: python-zmq
Version: 2.0.8
Release: 2%{?dist}
Version: 2.0.10
Release: 1%{?dist}
Summary: Software library for fast, message-based applications
Group: Development/Libraries
@ -23,8 +25,7 @@ URL: http://www.zeromq.org/bindings:python
# git clone http://github.com/zeromq/pyzmq.git pyzmq.git
# cd pyzmq.git
# 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
Patch0: python-zmq-os-walk.patch
Source0: http://cloud.github.com/downloads/zeromq/pyzmq/pyzmq-%{version}.tar.gz
BuildRequires: python2-devel
BuildRequires: python-setuptools
@ -70,7 +71,6 @@ This package contains the python bindings.
%prep
%setup -q -n %{srcname}-%{version}
%patch0 -p1
# remove shebangs
for lib in zmq/eventloop/*.py; do
sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
@ -79,13 +79,12 @@ for lib in zmq/eventloop/*.py; do
done
# remove excecutable bits
chmod -x examples/kernel/frontend.py
chmod -x examples/pubsub/topics_pub.py
chmod -x examples/kernel/kernel.py
chmod -x examples/pubsub/topics_sub.py
# delete hidden files
find examples -name '.*' | xargs rm -v
#find examples -name '.*' | xargs rm -v
%if 0%{?with_python3}
rm -rf %{py3dir}
@ -93,6 +92,7 @@ cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
rm -r %{py3dir}/examples
2to3 --write --nobackups %{py3dir}
%endif
@ -129,18 +129,22 @@ popd
%check
rm zmq/__*
pushd zmq
PYTHONPATH=%{buildroot}%{python_sitearch} nosetests
popd
#pushd zmq
#PYTHONPATH=%{buildroot}%{python_sitearch} nosetests
#popd
PYTHONPATH=%{buildroot}%{python_sitearch} \
%{__python} setup.py test
rm -r %{buildroot}%{python_sitearch}/zmq/tests
%if 0%{?with_python3}
# there is no python3-nose yet
pushd %{py3dir}
rm zmq/__*
pushd zmq
#pushd zmq
#PYTHONPATH=%{buildroot}%{python3_sitearch} nosetests
popd
#popd
#PYTHONPATH=%{buildroot}%{python3_sitearch} \
# %{__python3} setup.py test
rm -r %{buildroot}%{python3_sitearch}/zmq/tests
popd
%endif
@ -164,6 +168,11 @@ popd
%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
- rebuild for newer python3

View File

@ -1 +1 @@
f70dfbf2b7d67eed011aa63674ee0937 pyzmq-2.0.8.tar.gz
b8b397b2b459c6cdf7571eca5b697bc5 pyzmq-2.0.10.tar.gz