From e28607802d925d57fb8fb2fd0cf0917dabb0840d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 26 May 2022 17:53:13 +0000 Subject: [PATCH] python3Packages.more-properties: init at 1.1.1 --- .../more-properties/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/more-properties/default.nix diff --git a/pkgs/development/python-modules/more-properties/default.nix b/pkgs/development/python-modules/more-properties/default.nix new file mode 100644 index 000000000000..e48dc9dbf04c --- /dev/null +++ b/pkgs/development/python-modules/more-properties/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "more-properties"; + version = "1.1.1"; + + # upstream requires >= 3.6 but only 3.7 includes dataclasses + disabled = pythonOlder "3.7"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "madman-bob"; + repo = "python-more-properties"; + rev = version; + hash = "sha256-dKG97rw5IG19m7u3ZDBM2yGScL5cFaKBvGZxPVJaUTE="; + }; + + postPatch = '' + mv pypi_upload/setup.py . + substituteInPlace setup.py \ + --replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]" + + # dataclasses is included in Python 3.7 + substituteInPlace requirements.txt \ + --replace dataclasses "" + ''; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "more_properties" ]; + + meta = { + description = "A collection of property variants"; + homepage = "https://github.com/madman-bob/python-more-properties"; + licenses = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f899cc5d1b5d..64d838f7767b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5426,6 +5426,8 @@ in { more-itertools = callPackage ../development/python-modules/more-itertools { }; + more-properties = callPackage ../development/python-modules/more-properties { }; + moretools = callPackage ../development/python-modules/moretools { }; morphys = callPackage ../development/python-modules/morphys { };