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 ]
40 ++ lib.optionals (!isPyPy) [ cffi ];
41
42 pythonImportsCheck = [ "persistent" ];
43
44 meta = with lib; {
45 description = "Automatic persistence for Python objects";
46 homepage = "https://github.com/zopefoundation/persistent/";
47 changelog = "https://github.com/zopefoundation/persistent/blob/${version}/CHANGES.rst";
48 license = licenses.zpl21;
49 maintainers = [ ];
50 };
51}