summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/zope-location/default.nix
blob: c4d05a2e06ceed8f04530f3565cf3747bebcf639 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  zope-interface,
  zope-proxy,
  zope-schema,
  zope-component,
  zope-configuration,
  zope-copy,
  unittestCheckHook,
}:

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

  src = fetchFromGitHub {
    owner = "zopefoundation";
    repo = "zope.location";
    tag = version;
    hash = "sha256-s7HZda+U87P62elX/KbDp2o9zAplgFVmnedDI/uq2sk=";
  };

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

  build-system = [ setuptools ];

  dependencies = [
    zope-interface
    zope-proxy
    zope-schema
  ];

  optional-dependencies = {
    zcml = [ zope-configuration ];
    component = [ zope-component ];
    copy = [ zope-copy ];
  };

  pythonImportsCheck = [ "zope.location" ];

  nativeCheckInputs = [ unittestCheckHook ];

  unittestFlagsArray = [ "src/zope/location/tests" ];

  pythonNamespaces = [ "zope" ];

  meta = {
    homepage = "https://github.com/zopefoundation/zope.location/";
    description = "Zope Location";
    changelog = "https://github.com/zopefoundation/zope.location/blob/${src.tag}/CHANGES.rst";
    license = lib.licenses.zpl21;
    maintainers = [ ];
  };
}