Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / more-properties / default.nix
blob05c75b8f2107eb921276847ec6c9c8ba8e4b2831
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , pytestCheckHook
6 }:
8 buildPythonPackage rec {
9   pname = "more-properties";
10   version = "1.1.1";
12   # upstream requires >= 3.6 but only 3.7 includes dataclasses
13   disabled = pythonOlder "3.7";
15   format = "setuptools";
17   src = fetchFromGitHub {
18     owner = "madman-bob";
19     repo = "python-more-properties";
20     rev = version;
21     hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE=";
22   };
24   postPatch = ''
25     mv pypi_upload/setup.py .
26     substituteInPlace setup.py \
27       --replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
29     # dataclasses is included in Python 3.7
30     substituteInPlace requirements.txt \
31       --replace dataclasses ""
32   '';
34   nativeCheckInputs = [
35     pytestCheckHook
36   ];
38   pythonImportsCheck = [ "more_properties" ];
40   meta = {
41     description = "A collection of property variants";
42     homepage = "https://github.com/madman-bob/python-more-properties";
43     license = lib.licenses.mit;
44     maintainers = with lib.maintainers; [ dotlambda ];
45   };