1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 isPyPy,
6
7 # build-systems
8 setuptools,
9
10 # dependencies
11 cffi,
12 zope-deferredimport,
13 zope-interface,
14 pythonOlder,
15}:
16
17buildPythonPackage rec {
18 pname = "persistent";
19 version = "6.1.1";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-LTIbYOsH75APhals8HH/jDua7m5nm+zEjEbzRX6NnS8=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace-fail "setuptools < 74" "setuptools"
32 '';
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 zope-interface
38 zope-deferredimport
39 ] ++ lib.optionals (!isPyPy) [ cffi ];
40
41 pythonImportsCheck = [ "persistent" ];
42
43 meta = with lib; {
44 description = "Automatic persistence for Python objects";
45 homepage = "https://github.com/zopefoundation/persistent/";
46 changelog = "https://github.com/zopefoundation/persistent/blob/${version}/CHANGES.rst";
47 license = licenses.zpl21;
48 maintainers = [ ];
49 };
50}