%global srcname compress-pickle %global pypiname compress_pickle Name: python-%{srcname} Version: 2.1.0 Release: 1%{?dist} Summary: Standard pickle with transparent compression, chosen by file extension License: MIT URL: https://github.com/lucianopaz/compress_pickle # The GitHub tag, not the sdist: the sdist leaves out the tests. Source: %{url}/archive/v%{version}/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check. The suite is parametrized over every pickler and compressor, so the # optional ones must be present or the dill cases fail rather than skip. BuildRequires: python3-pytest BuildRequires: python3-numpy BuildRequires: python3-dill BuildRequires: python3-cloudpickle BuildRequires: python3-lz4 %global _description %{expand: compress_pickle wraps pickle so that dump and load pick the compression from the file extension: gzip, bz2, lzma and zipfile from the standard library, and lz4 with the extra. Picklers other than pickle (dill, cloudpickle) can be selected by name.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description # lz4 is the one extra pydantic_numpy asks for (compress-pickle[lz4]); dill and # cloudpickle have their own extras and Fedora has both libraries. %pyproject_extras_subpkg -n python3-%{srcname} lz4 dill cloudpickle %prep %autosetup -p1 -n %{pypiname}-%{version} %generate_buildrequires %pyproject_buildrequires -x lz4,dill,cloudpickle %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypiname} %check %pytest -q tests %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog * Fri Oct 23 2026 Morgan Hough - 2.1.0-1 - Initial package: compress_pickle 2.1.0 (MIT, per LICENSE). Net-new to Fedora; a pydantic_numpy dependency, and so a mkstd one. - Built from the GitHub tag for its tests. %%check on f44 with lz4 4.4.4, dill 0.4.1 and cloudpickle 3.1.2: 795 pass, 1 skip, 0 fail, offline. - Sub-packages python3-compress-pickle+lz4, +dill and +cloudpickle carry the extras' dependencies; pydantic_numpy requires compress-pickle[lz4].