From ab4166311b15485e0dd37ceb0cdfc3267dc441ea Mon Sep 17 00:00:00 2001 From: Keke Ming Date: Sun, 22 Feb 2026 20:06:25 +0800 Subject: [PATCH] add python-execnet --- python-execnet.spec | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 python-execnet.spec diff --git a/python-execnet.spec b/python-execnet.spec new file mode 100644 index 0000000..85eb870 --- /dev/null +++ b/python-execnet.spec @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Jvle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname execnet + +%bcond doc 0 + +Name: python-%{srcname} +Version: 2.1.2 +Release: %autorelease +Summary: Distributed Python deployment and communication +License: MIT AND GPLv2+ +URL: http://codespeak.net/execnet +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} + +BuildRequires: procps-ng +BuildRequires: pkgconfig(python3) +%if %{with doc} +BuildRequires: make +BuildRequires: sphinx-build +%endif +BuildRequires: python3-pytest + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +%description +execnet provides a share-nothing model with channel-send/receive +communication for distributing execution across many Python +interpreters across version, platform and network barriers. It has a +minimal and fast API targetting the following uses: + + * distribute tasks to (many) local or remote CPUs + * write and deploy hybrid multi-process applications + * write scripts to administer multiple environments + +%prep -a +# remove shebangs and fix permissions +find . -type f -a \( -name '*.py' -o -name 'py.*' \) \ + -exec sed -i '1{/^#!/d}' {} \; \ + -exec chmod u=rw,go=r {} \; + +%generate_buildrequires +%pyproject_buildrequires + +%build -p +SETUPTOOLS_SCM_PRETEND_VERSION=%{version} + +%build -a +%if %{with doc} +make -C doc html PYTHONPATH=$(pwd)/src +# remove hidden file +rm doc/_build/html/.buildinfo +%endif + +%install -p +SETUPTOOLS_SCM_PRETEND_VERSION=%{version} + +%check +%pytest -k "not gevent and not eventlet and not test_dont_write_bytecode" testing + +%files -f %{pyproject_files} +%doc README.rst +%license LICENSE + +%changelog +%{?autochangelog} \ No newline at end of file