diff --git a/python-zmq.spec b/python-zmq.spec new file mode 100644 index 0000000..cbf72f6 --- /dev/null +++ b/python-zmq.spec @@ -0,0 +1,92 @@ +Name: python-zmq +Version: 17.0.0 +Release: 4 +Summary: Python bindings for zeromq +License: LGPLv3+ and ASL 2.0 and BSD +URL: http://www.zeromq.org/bindings:python +Source0: https://github.com/zeromq/pyzmq/archive/v%{version}.tar.gz#/pyzmq-%{version}.tar.gz +BuildRequires: python2-devel python2-setuptools zeromq-devel python2-Cython +BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools +BuildRequires: python2-tools chrpath python3-devel + +%description +This package contains the Python bindings for 0MQ.0MQ is a +lightweight and fast messaging implementation. + +%package -n python2-zmq +Summary: Python bindings for zeromq +%{?python_provide:%python_provide python2-zmq} + +%description -n python2-zmq +This package contains the Python bindings for 0MQ.0MQ is a +lightweight and fast messaging implementation. + +%package -n python2-zmq-devel +Summary: Python bindings for zeromq +License: LGPLv3+ +Requires: python2-zmq = %{version}-%{release} +Provides: python2-zmq-tests = %{version}-%{release} +Obsoletes: python2-zmq-tests < %{version}-%{release} + +%description -n python2-zmq-devel +This package contains the testsuite for the 0MQ.0MQ is a +lightweight and fast messaging implementation. + +%package -n python%{python3_pkgversion}-zmq +Summary: Python bindings for zeromq +License: LGPLv3+ +%{?python_provide:%python_provide python%{python3_pkgversion}-zmq} + +%description -n python%{python3_pkgversion}-zmq +This package contains the Python bindings for 0MQ.0MQ is a +lightweight and fast messaging implementation. + +%package -n python%{python3_pkgversion}-zmq-devel +Summary: Python bindings for zeromq +License: LGPLv3+ +Requires: python%{python3_pkgversion}-zmq = %{version}-%{release} +Provides: python%{python3_pkgversion}-zmq-tests = %{version}-%{release} +Obsoletes: python%{python3_pkgversion}-zmq-tests < %{version}-%{release} + +%description -n python%{python3_pkgversion}-zmq-devel +This package contains the testsuite for the 0MQ.0MQ is a +lightweight and fast messaging implementation. + +%prep +%autosetup -n pyzmq-%{version} -p1 +rm -rf bundled +for lib in zmq/eventloop/*.py; do sed -i '/\/usr\/bin\/env/d' $lib; done +chmod -x examples/pubsub/topics_{pub.py,sub.py} + +%build +CFLAGS="%{optflags}" %{__python2} setup.py build_ext --inplace +%py2_build +CFLAGS="%{optflags}" %{__python3} setup.py build_ext --inplace +%py3_build + +%install +%global RPATH /zmq/{backend/cython,devices} +%py3_install +pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitearch} +%py2_install +pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitearch} + +%files -n python2-zmq +%doc README.md examples/ COPYING.* +%{python2_sitearch}/* +%exclude %{python2_sitearch}/zmq/tests + +%files -n python2-zmq-devel +%{python2_sitearch}/zmq/tests + +%files -n python%{python3_pkgversion}-zmq +%doc README.md COPYING.* +%{python3_sitearch}/* +%exclude %{python3_sitearch}/zmq/tests + +%files -n python%{python3_pkgversion}-zmq-devel +%{python3_sitearch}/zmq/tests + +%changelog +* Fri Mar 6 2020 likexin - 17.0.0-4 +- package init diff --git a/pyzmq-17.0.0.tar.gz b/pyzmq-17.0.0.tar.gz new file mode 100644 index 0000000..462b386 Binary files /dev/null and b/pyzmq-17.0.0.tar.gz differ