Blame python-multiprocess.spec

3cebecf
%global _description %{expand:
3cebecf
multiprocess is a fork of multiprocessing, and is developed as part of
3cebecf
pathos: https://github.com/uqfoundation/pathos
3cebecf
3cebecf
multiprocessing is a package for the Python language which supports the
3cebecf
spawning of processes using the API of the standard library’s threading module.
3cebecf
multiprocessing has been distributed in the standard library since python 2.6.
3cebecf
3cebecf
Features:
3cebecf
3cebecf
- Objects can be transferred between processes using pipes or
3cebecf
  multi-producer/multi-consumer queues.
3cebecf
- Objects can be shared between processes using a server process or
3cebecf
  (for simple data) shared memory.
3cebecf
- Equivalents of all the synchronization primitives in threading are
3cebecf
  available.
3cebecf
- A Pool class makes it easy to submit tasks to a pool of worker
3cebecf
  processes.
3cebecf
3cebecf
multiprocess is part of pathos, a python framework for heterogeneous
3cebecf
computing. multiprocess is in active development, so any user feedback,
3cebecf
bug reports, comments, or suggestions are highly appreciated. A list of
3cebecf
issues is located at
3cebecf
https://github.com/uqfoundation/multiprocess/issues, with a legacy list
3cebecf
maintained at https://uqfoundation.github.io/project/pathos/query.}
3cebecf
589b253
Name:           python-multiprocess
112a65b
Version:        0.70.13
b42651e
Release:        %autorelease
3cebecf
Summary:        Better multiprocessing and multithreading in python
3cebecf
3cebecf
License:        BSD
589b253
URL:            https://pypi.org/pypi/multiprocess
112a65b
Source0:        %{pypi_source multiprocess %{version} tar.gz}
3cebecf
BuildArch:      noarch
3cebecf
3cebecf
%description %_description
3cebecf
589b253
%package -n python3-multiprocess
3cebecf
Summary:        %{summary}
3cebecf
BuildRequires:  python3-devel
112a65b
# required for tests
3cebecf
BuildRequires:  python-unversioned-command
112a65b
# Not automatically generated
3cebecf
BuildRequires:  python3-test
3cebecf
589b253
%description -n python3-multiprocess %_description
3cebecf
3cebecf
%package doc
3cebecf
Summary:        Documentation for %{name}
3cebecf
3cebecf
%description doc
3cebecf
This package provides documentation for %{name}.
3cebecf
3cebecf
%prep
589b253
%autosetup -n multiprocess-%{version}
589b253
rm -rf multiprocess.egg-info
3cebecf
3cebecf
# Fix wrong end of file encoding
3cebecf
find py%{python3_version}/doc/ -name "*" -exec sed -i 's/\r$//' '{}' \;
3cebecf
find py%{python3_version}/examples/ -name "*" -exec sed -i 's/\r$//' '{}' \;
3cebecf
3cebecf
# remove shebang
589b253
sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' py%{python3_version}/multiprocess/tests/__main__.py
3cebecf
112a65b
%generate_buildrequires
112a65b
%pyproject_buildrequires
112a65b
3cebecf
%build
112a65b
%pyproject_wheel
3cebecf
3cebecf
%install
112a65b
%pyproject_install
112a65b
%pyproject_save_files multiprocess _multiprocess
3cebecf
3cebecf
%check
3cebecf
export PYTHONPATH="$RPM_BUILD_ROOT/%{python3_sitearch}/:$RPM_BUILD_ROOT/%{python3_sitelib}/:."
3cebecf
pushd py%{python3_version}
3cebecf
# https://github.com/uqfoundation/multiprocess/blob/master/.travis.yml#L67
3cebecf
for test in multiprocess/tests/__init__.py; do echo $test ; %{__python3} $test > /dev/null; done
3cebecf
3cebecf
# These do not run properly in the build root: it cannot find the installed version even after PYTHONPATH is set
3cebecf
#for test in multiprocess/tests/*.py; do if [[ $test != *"__"* && $test != *"mp_"*  ]]; then echo $test ; %%{__python3} $test > /dev/null; fi; done
3cebecf
popd
3cebecf
3cebecf
112a65b
%files -n python3-multiprocess -f %{pyproject_files}
112a65b
%doc README.md
3cebecf
3cebecf
%files doc
112a65b
%license LICENSE COPYING
112a65b
%doc README.md
3cebecf
%doc py%{python3_version}/examples/
3cebecf
%doc py%{python3_version}/doc/
3cebecf
3cebecf
%changelog
b42651e
%autochangelog