summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/more-properties/default.nix
blob: 0a62ed9c4ac250b118c668e7cc56d37fb080edd9 (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
{
  lib,
  buildPythonPackage,
  pythonAtLeast,
  fetchFromGitHub,
  setuptools,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "more-properties";
  version = "1.1.1";
  pyproject = true;

  # All tests are failing with:
  # AssertionError: None != 'The type of the None singleton.'
  disabled = pythonAtLeast "3.13";

  src = fetchFromGitHub {
    owner = "madman-bob";
    repo = "python-more-properties";
    tag = version;
    hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE=";
  };

  postPatch = ''
    mv pypi_upload/setup.py .
    substituteInPlace setup.py \
      --replace-fail "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
  '';

  build-system = [
    setuptools
  ];

  pythonRemoveDeps = [
    # dataclasses is included in Python since 3.7
    "dataclasses"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "more_properties" ];

  meta = {
    description = "Collection of property variants";
    homepage = "https://github.com/madman-bob/python-more-properties";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}