anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / more-properties / default.nix
blob53e79468c66bcb0b127f25e0214a89647e98e325
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   pytestCheckHook,
7 }:
9 buildPythonPackage rec {
10   pname = "more-properties";
11   version = "1.1.1";
13   # upstream requires >= 3.6 but only 3.7 includes dataclasses
14   disabled = pythonOlder "3.7";
16   format = "setuptools";
18   src = fetchFromGitHub {
19     owner = "madman-bob";
20     repo = "python-more-properties";
21     rev = version;
22     hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE=";
23   };
25   postPatch = ''
26     mv pypi_upload/setup.py .
27     substituteInPlace setup.py \
28       --replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
30     # dataclasses is included in Python 3.7
31     substituteInPlace requirements.txt \
32       --replace dataclasses ""
33   '';
35   nativeCheckInputs = [ pytestCheckHook ];
37   pythonImportsCheck = [ "more_properties" ];
39   meta = {
40     description = "Collection of property variants";
41     homepage = "https://github.com/madman-bob/python-more-properties";
42     license = lib.licenses.mit;
43     maintainers = with lib.maintainers; [ dotlambda ];
44   };