From 4560763389614c30299b26f91c11994fef831e7e Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Apr 20 2014 15:26:15 +0000 Subject: Latest upstream. --- diff --git a/python-txzmq.spec b/python-txzmq.spec index 2e7962a..d5d6677 100644 --- a/python-txzmq.spec +++ b/python-txzmq.spec @@ -1,7 +1,19 @@ +%if 0%{?fedora} +# Well, damnit. I did the work to port this to python3, but we don't have +# python3-twisted-core in Fedora yet. Disabling this for now. +%global with_python3 0 +%endif + +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + %global modname txZMQ Name: python-txzmq -Version: 0.7.0 +Version: 0.7.2 Release: 1%{?dist} Summary: Twisted bindings for ZeroMQ @@ -18,13 +30,39 @@ BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: python-zmq >= 13.0.0 BuildRequires: python-twisted-core +BuildRequires: python-six Requires: python-zmq >= 13.0.0 Requires: python-twisted-core +Requires: python-six + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-nose +BuildRequires: python3-zmq >= 13.0.0 +BuildRequires: python3-twisted-core +BuildRequires: python3-six +%endif %description -txZMQ allows to integrate easily `ZeroMQ `_ sockets into -Twisted event loop (reactor). +txZMQ allows to integrate easily ZeroMQ sockets into Twisted event loop +(reactor). + +%if 0%{?with_python3} +%package -n python3-txzmq +Summary: Twisted bindings for ZeroMQ +Group: Development/Languages + +Requires: python3-zmq >= 13.0.0 +Requires: python3-twisted-core +Requires: python3-six + +%description -n python3-txzmq +txZMQ allows to integrate easily ZeroMQ sockets into Twisted event loop +(reactor). +%endif + %prep %setup -q -n %{modname}-%{version} @@ -36,21 +74,54 @@ Twisted event loop (reactor). %{__sed} -i 's/"Twisted",//' setup.py %endif +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + %build -%{__python} setup.py build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif %check PYTHONPATH=$(pwd) nosetests +%if 0%{?with_python3} +pushd %{py3dir} +PYTHONPATH=$(pwd) nosetests-%{python3_version} +popd +%endif + %install -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd +%endif %files %doc README.rst LICENSE.txt -%{python_sitelib}/txzmq/ -%{python_sitelib}/txZMQ-%{version}*.egg-info +%{python2_sitelib}/txzmq/ +%{python2_sitelib}/txZMQ-%{version}*.egg-info + +%if 0%{?with_python3} +%files -n python3-txzmq +%doc README.rst LICENSE.txt +%{python3_sitelib}/txzmq/ +%{python3_sitelib}/txZMQ-%{version}*.egg-info +%endif %changelog +* Sat Apr 19 2014 Ralph Bean - 0.7.2-1 +- Latest upstream with python3 support -- woot, woot! + * Tue Jan 28 2014 Ralph Bean - 0.7.0-1 - Latest upstream. - Dropped support for older pyzmq.