Blob Blame History Raw
Name:           python-zodbpickle
Version:        3.3
Release:        %autorelease
Summary:        Fork of Python 2 pickle module for ZODB

# Code taken from the python 3 sources is covered by the PSF-2.0 license.
# Additions to that code are covered by the ZPL-2.1 license.
License:        PSF-2.0 AND ZPL-2.1
URL:            https://www.zodb.org/
VCS:            https://github.com/zopefoundation/zodbpickle
Source0:        %pypi_source zodbpickle

BuildRequires:  gcc
BuildRequires:  python3-devel
BuildRequires:  python3-test
BuildRequires:  %{py3_dist docutils}

%global common_desc %{expand:
This package presents a uniform pickling interface for ZODB:
- Under Python2, this package forks both Python 2.7's pickle and cPickle
  modules, adding support for the protocol 3 opcodes.  It also provides
  a new subclass of bytes, zodbpickle.binary, which Python2 applications
  can use to pickle binary values such that they will be unpickled as
  bytes under Py3k.
- Under Py3k, this package forks the pickle module (and the supporting C
  extension) from Python 3.7 through 3.12.  The fork adds support for
  the noload operations used by ZODB.}

%description %{common_desc}

%package -n python3-zodbpickle
Summary:        Fork of Python 3 pickle module for ZODB

%description -n python3-zodbpickle %{common_desc}

%prep
%autosetup -n zodbpickle-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -t -x test

%build
%pyproject_wheel
rst2html --no-datestamp CHANGES.rst CHANGES.html
rst2html --no-datestamp README.rst README.html

%install
%pyproject_install
%pyproject_save_files zodbpickle

%check
%tox

%files -n python3-zodbpickle -f %{pyproject_files}
%doc CHANGES.html README.html
%exclude %{python3_sitearch}/zodbpickle/*.c

%changelog
%autochangelog