36179bc
%global with_python3 1
36179bc
0698deb
%if 0%{?fedora}
0698deb
%{!?python3_pkgversion: %global python3_pkgversion 3}
0698deb
%else
0698deb
%{!?python3_pkgversion: %global python3_pkgversion 34}
0698deb
%endif
36179bc
a0075ca
%{?filter_setup:
a0075ca
%filter_provides_in %{python_sitearch}/.*\.so$
52a009b
%if 0%{?with_python3}
Thomas Spura 6d9942d
%filter_provides_in %{python3_sitearch}/.*\.so$
Thomas Spura 6d9942d
%endif
a0075ca
%filter_setup
a0075ca
}
36179bc
36179bc
%global checkout 18f5d061558a176f5496aa8e049182c1a7da64f6
36179bc
36179bc
%global srcname pyzmq
Thomas Spura ee162bc
%global modname zmq
36179bc
48bbb9f
%global run_tests 1
bc2b5f7
36179bc
Name:           python-zmq
Thomas Spura 3852705
Version:        14.7.0
f902240
Release:        6%{?dist}
36179bc
Summary:        Software library for fast, message-based applications
36179bc
36179bc
Group:          Development/Libraries
Thomas Spura 929a52d
License:        LGPLv3+ and ASL 2.0 and BSD
36179bc
URL:            http://www.zeromq.org/bindings:python
36179bc
# VCS:          git:http://github.com/zeromq/pyzmq.git
36179bc
# git checkout with the commands:
36179bc
# git clone http://github.com/zeromq/pyzmq.git pyzmq.git
36179bc
# cd pyzmq.git
36179bc
# git archive --format=tar --prefix=pyzmq-%%{version}/ %%{checkout} | xz -z --force - > pyzmq-%%{version}.tar.xz
Thomas Spura 929a52d
Source0:        https://pypi.python.org/packages/source/p/pyzmq/pyzmq-%{version}.tar.gz
36179bc
Thomas Spura 7a232ed
BuildRequires:  chrpath
Thomas Spura 7a232ed
36179bc
BuildRequires:  python2-devel
36179bc
BuildRequires:  python-setuptools
Thomas Spura a0ec17e
BuildRequires:  zeromq-devel
36179bc
BuildRequires:  python-nose
3e51fab
BuildRequires:  Cython
36179bc
Thomas Spura 3852705
# For some tests
Thomas Spura e34ead2
# czmq currently FTBFS, so enable it some time later
Thomas Spura e34ead2
#BuildRequires:  czmq-devel
Thomas Spura 3852705
36179bc
%if 0%{?with_python3}
0698deb
BuildRequires:  python%{python3_pkgversion}-devel
0698deb
BuildRequires:  python%{python3_pkgversion}-setuptools
36179bc
# needed for 2to3
36179bc
BuildRequires:  python-tools
0698deb
BuildRequires:  python%{python3_pkgversion}-nose
36179bc
%endif
36179bc
Thomas Spura a0ec17e
36179bc
%description
36179bc
The 0MQ lightweight messaging kernel is a library which extends the
36179bc
standard socket interfaces with features traditionally provided by
36179bc
specialized messaging middle-ware products. 0MQ sockets provide an
36179bc
abstraction of asynchronous message queues, multiple messaging
36179bc
patterns, message filtering (subscriptions), seamless access to
36179bc
multiple transport protocols and more.
36179bc
36179bc
This package contains the python bindings.
36179bc
Thomas Spura ee162bc
%package -n python2-zmq
Thomas Spura ee162bc
Summary:        Software library for fast, message-based applications
Thomas Spura ee162bc
%{?python_provide:%python_provide python2-%{modname}}
Thomas Spura ee162bc
%description -n python2-zmq
Thomas Spura ee162bc
The 0MQ lightweight messaging kernel is a library which extends the
Thomas Spura ee162bc
standard socket interfaces with features traditionally provided by
Thomas Spura ee162bc
specialized messaging middle-ware products. 0MQ sockets provide an
Thomas Spura ee162bc
abstraction of asynchronous message queues, multiple messaging
Thomas Spura ee162bc
patterns, message filtering (subscriptions), seamless access to
Thomas Spura ee162bc
multiple transport protocols and more.
Thomas Spura ee162bc
Thomas Spura ee162bc
This package contains the python bindings.
36179bc
Thomas Spura ee162bc
Thomas Spura ee162bc
%package -n python2-zmq-tests
Thomas Spura 0b1941e
Summary:        Software library for fast, message-based applications
Thomas Spura 0b1941e
Group:          Development/Libraries
Thomas Spura 0b1941e
License:        LGPLv3+
Thomas Spura ee162bc
Requires:       python2-zmq = %{version}-%{release}
Thomas Spura ee162bc
%{?python_provide:%python_provide python2-%{modname}-tests}
Thomas Spura ee162bc
%description -n python2-zmq-tests
Thomas Spura 0b1941e
The 0MQ lightweight messaging kernel is a library which extends the
Thomas Spura 0b1941e
standard socket interfaces with features traditionally provided by
Thomas Spura 0b1941e
specialized messaging middle-ware products. 0MQ sockets provide an
Thomas Spura 0b1941e
abstraction of asynchronous message queues, multiple messaging
Thomas Spura 0b1941e
patterns, message filtering (subscriptions), seamless access to
Thomas Spura 0b1941e
multiple transport protocols and more.
Thomas Spura 0b1941e
Thomas Spura 0b1941e
This package contains the testsuite for the python bindings.
Thomas Spura 0b1941e
Thomas Spura 0b1941e
36179bc
%if 0%{?with_python3}
0698deb
%package -n python%{python3_pkgversion}-zmq
36179bc
Summary:        Software library for fast, message-based applications
36179bc
Group:          Development/Libraries
36179bc
License:        LGPLv3+
Thomas Spura ee162bc
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
0698deb
%description -n python%{python3_pkgversion}-zmq
36179bc
The 0MQ lightweight messaging kernel is a library which extends the
36179bc
standard socket interfaces with features traditionally provided by
36179bc
specialized messaging middle-ware products. 0MQ sockets provide an
36179bc
abstraction of asynchronous message queues, multiple messaging
36179bc
patterns, message filtering (subscriptions), seamless access to
36179bc
multiple transport protocols and more.
36179bc
36179bc
This package contains the python bindings.
Thomas Spura 0b1941e
Thomas Spura 0b1941e
0698deb
%package -n python%{python3_pkgversion}-zmq-tests
Thomas Spura 0b1941e
Summary:        Software library for fast, message-based applications
Thomas Spura 0b1941e
Group:          Development/Libraries
Thomas Spura 0b1941e
License:        LGPLv3+
0698deb
Requires:       python%{python3_pkgversion}-zmq = %{version}-%{release}
Thomas Spura ee162bc
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}-tests}
0698deb
%description -n python%{python3_pkgversion}-zmq-tests
Thomas Spura 0b1941e
The 0MQ lightweight messaging kernel is a library which extends the
Thomas Spura 0b1941e
standard socket interfaces with features traditionally provided by
Thomas Spura 0b1941e
specialized messaging middle-ware products. 0MQ sockets provide an
Thomas Spura 0b1941e
abstraction of asynchronous message queues, multiple messaging
Thomas Spura 0b1941e
patterns, message filtering (subscriptions), seamless access to
Thomas Spura 0b1941e
multiple transport protocols and more.
Thomas Spura 0b1941e
Thomas Spura 0b1941e
This package contains the testsuite for the python bindings.
Thomas Spura 0b1941e
36179bc
%endif
36179bc
36179bc
36179bc
%prep
36179bc
%setup -q -n %{srcname}-%{version}
3e51fab
Thomas Spura 7a232ed
# remove bundled libraries
Thomas Spura 7a232ed
rm -rf bundled
Thomas Spura 7a232ed
3e51fab
# forcibly regenerate the Cython-generated .c files:
Thomas Spura a0ec17e
#find zmq -name "*.c" -delete
Thomas Spura 3852705
#%%{__python} setup.py cython
3e51fab
36179bc
# remove shebangs
36179bc
for lib in zmq/eventloop/*.py; do
36179bc
    sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
36179bc
    touch -r $lib $lib.new &&
36179bc
    mv $lib.new $lib
36179bc
done
36179bc
36179bc
# remove excecutable bits
36179bc
chmod -x examples/pubsub/topics_pub.py
36179bc
chmod -x examples/pubsub/topics_sub.py
36179bc
342c17d
# delete hidden files
a0075ca
#find examples -name '.*' | xargs rm -v
a0075ca
342c17d
36179bc
36179bc
%build
Thomas Spura 92c86a7
%global py_setup setupegg.py
Thomas Spura 5cfd6bb
%py2_build
36179bc
36179bc
%if 0%{?with_python3}
Thomas Spura 5cfd6bb
%py3_build
36179bc
%endif # with_python3
36179bc
36179bc
36179bc
36179bc
%install
Thomas Spura 7a232ed
%global RPATH /zmq/{backend/cython,devices}
36179bc
# Must do the python3 install first because the scripts in /usr/bin are
36179bc
# overwritten with every setup.py install (and we want the python2 version
36179bc
# to be the default for now).
36179bc
%if 0%{?with_python3}
Thomas Spura 5cfd6bb
%py3_install
36179bc
Thomas Spura 7a232ed
chrpath --delete %{buildroot}%{python3_sitearch}%{RPATH}/*.so
36179bc
%endif # with_python3
36179bc
36179bc
Thomas Spura 5cfd6bb
%py2_install
36179bc
Thomas Spura 7a232ed
chrpath --delete %{buildroot}%{python_sitearch}%{RPATH}/*.so
36179bc
36179bc
36179bc
%check
bc2b5f7
%if 0%{?run_tests}
bc2b5f7
    rm zmq/__*
Thomas Spura 5cfd6bb
    PYTHONPATH=%{buildroot}%{python2_sitearch} \
Thomas Spura 5cfd6bb
        %{__python2} setup.py test
36179bc
bc2b5f7
    %if 0%{?with_python3}
Thomas Spura ac56d38
    # Temporarily disable the testsuite for now as it currently hangs in koji:
Thomas Spura ac56d38
    # http://koji.fedoraproject.org/koji/taskinfo?taskID=10191201
Thomas Spura 5cfd6bb
    #rm zmq/__*
Thomas Spura ac56d38
    #PYTHONPATH=%{buildroot}%{python3_sitearch} \
Thomas Spura ac56d38
    #    %{__python3} setup.py test
Thomas Spura 4a599bb
    %endif
36179bc
%endif
36179bc
36179bc
Thomas Spura ee162bc
%files -n python2-%{modname}
Thomas Spura 929a52d
%doc README.md COPYING.* examples/
Thomas Spura ee162bc
%{python2_sitearch}/%{srcname}-*.egg-info
Thomas Spura ee162bc
%{python2_sitearch}/zmq
Thomas Spura ee162bc
%exclude %{python2_sitearch}/zmq/tests
36179bc
Thomas Spura ee162bc
%files -n python2-%{modname}-tests
Thomas Spura ee162bc
%{python2_sitearch}/zmq/tests
36179bc
36179bc
%if 0%{?with_python3}
0698deb
%files -n python%{python3_pkgversion}-zmq
Thomas Spura 929a52d
%doc README.md COPYING.*
36179bc
# examples/
36179bc
%{python3_sitearch}/%{srcname}-*.egg-info
36179bc
%{python3_sitearch}/zmq
Thomas Spura 8fd9ec1
%exclude %{python3_sitearch}/zmq/tests
Thomas Spura 0b1941e
0698deb
%files -n python%{python3_pkgversion}-zmq-tests
Thomas Spura 0b1941e
%{python3_sitearch}/zmq/tests
36179bc
%endif
36179bc
36179bc
36179bc
%changelog
f902240
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 14.7.0-6
f902240
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f902240
Thomas Spura 92c86a7
* Mon Nov 16 2015 Thomas Spura <tomspur@fedoraproject.org> - 14.7.0-5
Thomas Spura 92c86a7
- Use setupegg.py for building/installing to have an unzip'ed egg
Thomas Spura 92c86a7
ad8f60c
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.7.0-4
ad8f60c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
ad8f60c
Thomas Spura e01d6be
* Fri Oct 16 2015 Thomas Spura <tomspur@fedoraproject.org> - 14.7.0-3
Thomas Spura e01d6be
- rebuilt to pick up new obsoletes/provides
Thomas Spura e01d6be
Thomas Spura ee162bc
* Wed Oct 14 2015 Thomas Spura <tomspur@fedoraproject.org> - 14.7.0-2
Thomas Spura 5cfd6bb
- Use python_provide and py_build macros
Thomas Spura 5cfd6bb
- Cleanup spec
Thomas Spura ee162bc
0698deb
* Mon Jun 29 2015 Ralph Bean <rbean@redhat.com> - 14.7.0-2
0698deb
- Support python34 on EPEL7.
0698deb
Thomas Spura 3852705
* Tue Jun 23 2015 Thomas Spura <tomspur@fedoraproject.org> - 14.7.0-1
Thomas Spura 3852705
- update to 14.7.0
Thomas Spura e8c1d40
- temporarily disable python3 testsuite as it hangs on koji
Thomas Spura 3852705
1a2809f
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.4.1-2
1a2809f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1a2809f
Thomas Spura a0ec17e
* Mon Nov 17 2014 Thomas Spura <tomspur@fedoraproject.org> - 14.4.1-1
Thomas Spura a0ec17e
- update to 14.4.1
Thomas Spura a0ec17e
- build against zeromq-4
Thomas Spura a0ec17e
Thomas Spura 7a232ed
* Wed Aug 27 2014 Thomas Spura <tomspur@fedoraproject.org> - 14.3.1-1
Thomas Spura 7a232ed
- update to 14.3.1
Thomas Spura 7a232ed
3a8fb19
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0.2-4
3a8fb19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
3a8fb19
d2afc48
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0.2-3
d2afc48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d2afc48
ed877dc
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 13.0.2-2
ed877dc
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
ed877dc
Thomas Spura c4b2c8e
* Mon Aug  5 2013 Thomas Spura <tomspur@fedoraproject.org> - 13.0.2-1
Thomas Spura c4b2c8e
- update to new version (fixes FTBFS)
Thomas Spura c4b2c8e
9b236c4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0.0-2
9b236c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9b236c4
Thomas Spura 929a52d
* Wed Mar 20 2013 Thomas Spura <tomspur@fedoraproject.org> - 13.0.0-1
Thomas Spura 929a52d
- update to 13.0.0
Thomas Spura 929a52d
- add BSD to license list
Thomas Spura 929a52d
94dcac6
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0.1-2
94dcac6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
94dcac6
Thomas Spura 83eb44e
* Mon Oct 15 2012 Thomas Spura <tomspur@fedoraproject.org> - 2.2.0.1-1
Thomas Spura 350aace
- update to 2.2.0.1
Thomas Spura 350aace
- move to BR zeromq3
Thomas Spura e5e1aa4
- not all *.c files may be deleted, when receneration of .c files by Cython
Thomas Spura e5e1aa4
- remove bundled folder explicitely
Thomas Spura 350aace
292f598
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.2.0-5
292f598
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
292f598
3e51fab
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 2.2.0-4
3e51fab
- force regeneration of .c files by Cython (needed for python 3.3 support)
3e51fab
52a009b
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 2.2.0-3
52a009b
- remove rhel logic from with_python3 conditional
52a009b
fbd1daa
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
fbd1daa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fbd1daa
Thomas Spura 440b6f1
* Thu Apr 26 2012 Thomas Spura <tomspur@fedoraproject.org> - 2.2.0-1
Thomas Spura 440b6f1
- update to 2.2.0
Thomas Spura 440b6f1
Thomas Spura 6c354bf
* Wed Mar  7 2012 Thomas Spura <tomspur@fedoraproject.org> - 2.1.11-1
Thomas Spura 6c354bf
- update to new version
Thomas Spura 6c354bf
5c7a9fd
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.9-4
5c7a9fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5c7a9fd
Thomas Spura 6d9942d
* Wed Dec 14 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.1.9-3
Thomas Spura 6d9942d
- tests package requires main package
Thomas Spura 6d9942d
- filter python3 libs
Thomas Spura 6d9942d
Thomas Spura 4155cf5
* Thu Dec  8 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.1.9-2
Thomas Spura 4155cf5
- use proper buildroot macro
Thomas Spura 8fd9ec1
- don't include tests twice
Thomas Spura 4155cf5
Thomas Spura 9c45c1e
* Wed Sep 21 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.1.9-1
Thomas Spura 9c45c1e
- update to new version
Thomas Spura 9c45c1e
- run testsuite on python3
Thomas Spura 9c45c1e
Thomas Spura 0b1941e
* Sun Jul 31 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.1.4-2
Thomas Spura 0b1941e
- don't delete the tests, needed by ipython-tests on runtime
Thomas Spura 0b1941e
- don't use _sourcedir macro
Thomas Spura 0b1941e
48bbb9f
* Wed Apr  6 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.1.4-1
48bbb9f
- update to new version (#690199)
48bbb9f
bc2b5f7
* Wed Mar 23 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.1.1-1
bc2b5f7
- update to new version (#682201)
bc2b5f7
b9823d1
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.10.1-2
b9823d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b9823d1
d57ff9e
* Sun Jan 30 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.0.10.1-1
d57ff9e
- update to new version (fixes memory leak)
d57ff9e
- no need to run 2to3 on python3 subpackage
d57ff9e
a0075ca
* Thu Jan 13 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.0.10-1
a0075ca
- update to new version
a0075ca
- remove patch (is upstream)
a0075ca
- run tests differently
a0075ca
9454fd3
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.8-2
9454fd3
- rebuild for newer python3
9454fd3
342c17d
* Thu Sep 23 2010 Thomas Spura <tomspur@fedoraproject.org> - 2.0.8-1
342c17d
- update to new version to be comply with zeromp
342c17d
5f758c2
* Sun Aug 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.20100725git18f5d06-4
5f758c2
- rebuild with python3.2
5f758c2
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
5f758c2
36179bc
* Thu Aug  5 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.20100725git18f5d06-3
36179bc
- add missing BR for 2to3
36179bc
36179bc
* Tue Aug  3 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.20100725git18f5d06-2
36179bc
- build python3 subpackage
36179bc
- rename to from pyzmq to python-zmq
36179bc
- change license
36179bc
36179bc
* Sun Jul 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.1.20100725git18f5d06-1
36179bc
- renew git snapshot
36179bc
- start from version 0.1 like upstream (not the version from zeromq)
36179bc
- remove buildroot / %%clean
36179bc
36179bc
* Sat Jun 12 2010 Thomas Spura 
36179bc
- initial package (based on upstreams example one)