%global desc cloudpickle makes it possible to serialize Python constructs \ not supported by the default pickle module from the Python standard \ library. cloudpickle is especially useful for cluster computing where \ Python expressions are shipped over the network to execute on remote \ hosts, possibly close to the data. Among other things, cloudpickle \ supports pickling for lambda expressions, functions and classes defined \ interactively in the __main__ module. %global python3_pkgversion 3.11 Name: python-cloudpickle Version: 3.0.0 Release: 2.ac8.py3.11%{?dist} Summary: Extended pickling support for Python objects License: BSD-3-Clause URL: https://github.com/cloudpipe/cloudpickle Source0: %{url}/archive/%{version}/cloudpickle-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel # Test requirements BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-psutil BuildRequires: python%{python3_pkgversion}-tornado %description %{desc} %package -n python%{python3_pkgversion}-cloudpickle Summary: %{summary} %{?python_provide:%python_provide python3-cloudpickle} %description -n python%{python3_pkgversion}-cloudpickle %{desc} %generate_buildrequires %pyproject_buildrequires %prep %autosetup -p1 -n cloudpickle-%{version} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files cloudpickle %check for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s/(.*).mo$/\1%{python3_pkgversion}.mo/"<<<"$m"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s/(.*).([1-8]([^.]+)?)$/\1%{python3_pkgversion}.\2/"<<<"$m"); done for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s/(.*)$/\1%{python3_pkgversion}/"<<<"$b"); done %pytest -v %files -n python%{python3_pkgversion}-cloudpickle -f %{pyproject_files} %doc README.md %license LICENSE %changelog * Wed Apr 03 2024 Ding-Yi Chen - 3.0.0-2.ac8.py3.11 - Cut corner packaging