summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/zope-size/default.nix
blob: 8632f12c9a71470904d9a9a670f1c50e97e5dea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  zope-i18nmessageid,
  zope-interface,
  unittestCheckHook,
  zope-component,
  zope-configuration,
  zope-security,
}:

buildPythonPackage rec {
  pname = "zope-size";
  version = "6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "zopefoundation";
    repo = "zope.size";
    tag = version;
    hash = "sha256-jjI9NvfxnIWZrqDEpZ6FDlhDWZoqEUBliiyh+5PxOAg=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "setuptools ==" "setuptools >="
  '';

  build-system = [ setuptools ];

  dependencies = [
    zope-i18nmessageid
    zope-interface
  ];

  optional-dependencies = {
    zcml = [
      zope-component
      zope-configuration
      zope-security
    ]
    ++ zope-component.optional-dependencies.zcml
    ++ zope-security.optional-dependencies.zcml;
  };

  pythonImportsCheck = [ "zope.size" ];

  nativeCheckInputs = [
    unittestCheckHook
  ]
  ++ lib.concatAttrValues optional-dependencies;

  unittestFlagsArray = [ "src/zope/size" ];

  pythonNamespaces = [ "zope" ];

  meta = {
    homepage = "https://github.com/zopefoundation/zope.size";
    description = "Interfaces and simple adapter that give the size of an object";
    changelog = "https://github.com/zopefoundation/zope.size/blob/${version}/CHANGES.rst";
    license = lib.licenses.zpl21;
    maintainers = [ ];
  };
}