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
10938e6
Version:        0.70.16
b42651e
Release:        %autorelease
3cebecf
Summary:        Better multiprocessing and multithreading in python
3cebecf
a63bc59
# The entire source is BSD-3-Clause, except py*/doc/html4css1.css, which are
a63bc59
# LicenseRef-Fedora-Public-Domain:
a63bc59
#
a63bc59
#   :Copyright: This stylesheet has been placed in the public domain.
fec4d1c
#
fec4d1c
# This was added to public-domain-text.txt in fedora-license-data in commit
fec4d1c
# 2cd8f00f97288c0d18edac6b68e3862cf6a71fdb:
fec4d1c
# https://gitlab.com/fedora/legal/fedora-license-data/-/merge_requests/211
a63bc59
License:        BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
facc1f4
URL:            https://github.com/uqfoundation/multiprocess
fb1834d
Source:         %{pypi_source multiprocess}
3cebecf
BuildArch:      noarch
3cebecf
81314d4
BuildRequires:  dos2unix
81314d4
3cebecf
%description %_description
3cebecf
589b253
%package -n python3-multiprocess
3cebecf
Summary:        %{summary}
a63bc59
# This subpackage does not contain the public-domain CSS file.
a63bc59
License:        BSD-3-Clause
a63bc59
3cebecf
BuildRequires:  python3-devel
d9b2920
# Required for tests; not automatically generated
3cebecf
BuildRequires:  python3-test
d9b2920
BuildRequires:  python3dist(pox)
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
fb1834d
%autosetup -n multiprocess-%{version}
3cebecf
81314d4
# Convert line endings
d49d85e
find py%{python3_version}/{doc,examples}/ -type f \
d49d85e
    -exec dos2unix --keepdate '{}' '+'
3cebecf
2cf0dbf
# Remove shebang
2cf0dbf
sed -r -i '1{/^#!/d}' py%{python3_version}/multiprocess/tests/__main__.py
3cebecf
1428f5f
# Upstream pretends not to be a pure-Python package to “force python-, abi-,
1428f5f
# and platform-specific naming of bdist_wheel”; this isn’t needed here, and we
1428f5f
# don’t want the RPM package to have to be arched.
1428f5f
sed -r -i 's/^([[:blank:]]*)(distclass=BinaryDistribution,)/\1# \2/' setup.py
1428f5f
fb1834d
# These tests appear to fail because the Python interpreter subprocess called
fb1834d
# through test.support.script_helper.assert_python_ok() does not inherit the
fb1834d
# PYTHONPATH environment variable, so it cannot find the multiprocess package
fb1834d
# in the buildroot.
fb1834d
s='@unittest.skip("Does not respect PYTHONPATH")'
fb1834d
for t in \
fb1834d
    test_spawn_sys_executable_none_allows_import \
fb1834d
    test_global_named_resource_spawn
fb1834d
do
fb1834d
  # The find-then-modify pattern keeps us from discarding mtimes on any sources
fb1834d
  # that do not need modification.
fb1834d
  find . -type f -name '*.py' -exec \
fb1834d
      gawk '/^[[:blank:]]*def '"$t"'\(/ { print FILENAME; nextfile }' '{}' '+' |
fb1834d
    xargs -r -t sed -r -i 's/^([[:blank:]]*)def '"$t"'\(/\1'"$s"'\n&/'
fb1834d
done
fb1834d
112a65b
%generate_buildrequires
112a65b
%pyproject_buildrequires
112a65b
3cebecf
%build
112a65b
%pyproject_wheel
3cebecf
3cebecf
%install
112a65b
%pyproject_install
8e40eef
%pyproject_save_files -l multiprocess _multiprocess
3cebecf
3cebecf
%check
e149550
# See tox.ini (but don’t try to use %%tox unless we comment out the explicit
e149550
# pip install command there):
8e88d4f
%{py3_test_envvars} %{python3} \
e149550
    py%{python3_version}/multiprocess/tests/__main__.py
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