|
|
|
@ -9,7 +9,6 @@ Source0: %{pypi_source pyzmq}
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: chrpath
|
|
|
|
|
BuildRequires: %{_bindir}/pathfix.py
|
|
|
|
|
|
|
|
|
|
BuildRequires: zeromq-devel
|
|
|
|
|
|
|
|
|
@ -59,38 +58,31 @@ This package contains the test suite for the Python bindings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n pyzmq-%{version}
|
|
|
|
|
%autosetup -n pyzmq-%{version}
|
|
|
|
|
|
|
|
|
|
# remove bundled libraries
|
|
|
|
|
rm -rf bundled
|
|
|
|
|
rm -rv bundled
|
|
|
|
|
|
|
|
|
|
# forcibly regenerate the Cython-generated .c files:
|
|
|
|
|
find zmq -name "*.c" -delete
|
|
|
|
|
%{__python3} setup.py cython
|
|
|
|
|
find zmq -name '*.c' -delete
|
|
|
|
|
|
|
|
|
|
# remove shebangs
|
|
|
|
|
for lib in zmq/eventloop/*.py; do
|
|
|
|
|
sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
|
|
|
|
|
touch -r $lib $lib.new &&
|
|
|
|
|
mv $lib.new $lib
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# remove excecutable bits
|
|
|
|
|
chmod -x examples/pubsub/topics_pub.py
|
|
|
|
|
chmod -x examples/pubsub/topics_sub.py
|
|
|
|
|
|
|
|
|
|
# delete hidden files
|
|
|
|
|
#find examples -name '.*' | xargs rm -v
|
|
|
|
|
# Remove useless shebangs in files that will be installed without executable
|
|
|
|
|
# permission. The pattern of selecting files before modifying them with sed
|
|
|
|
|
# keeps us from unnecessarily discarding the original mtimes on unmodified
|
|
|
|
|
# files.
|
|
|
|
|
find zmq -type f -name '*.py' \
|
|
|
|
|
-exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' |
|
|
|
|
|
xargs -r sed -r -i '1{/^#!/d}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{python3} setup.py cython
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%global RPATH /zmq/{backend/cython,devices}
|
|
|
|
|
%py3_install
|
|
|
|
|
pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitearch}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|