From 0af8b18cef1a5ed1002493e7a5e6c8731427d13b Mon Sep 17 00:00:00 2001 From: Bruno Rodrigues Date: Tue, 19 Nov 2024 10:08:28 +0100 Subject: [PATCH] python3Packages.gower: init at version 0.1.2 --- .../python-modules/gower/default.nix | 47 +++++++++++++++++++ .../gower/fix-pyproject_toml.patch | 11 +++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/gower/default.nix create mode 100644 pkgs/development/python-modules/gower/fix-pyproject_toml.patch diff --git a/pkgs/development/python-modules/gower/default.nix b/pkgs/development/python-modules/gower/default.nix new file mode 100644 index 000000000000..ad05ba9153cc --- /dev/null +++ b/pkgs/development/python-modules/gower/default.nix @@ -0,0 +1,47 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, + scipy, + pandas, +}: + +buildPythonPackage rec { + + pname = "gower"; + version = "0.1.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "wwwjk366"; + repo = "gower"; + rev = "d92f2145e65efe305143e9e30cc69b722d1c52e3"; + hash = "sha256-9S4uUEuntKyFbUY4wdYshsVT5Cssc/MCHqOnKHwZoVI="; + }; + + patches = [ + ./fix-pyproject_toml.patch + ]; + + build-system = [ setuptools ]; + + dependencies = [ + scipy + pandas + ]; + + pythonImportsCheck = [ "gower" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Gower's distance calculation in Python"; + homepage = "https://github.com/wwwjk366/gower"; + license = licenses.mit; + maintainers = with maintainers; [ b-rodrigues ]; + }; +} diff --git a/pkgs/development/python-modules/gower/fix-pyproject_toml.patch b/pkgs/development/python-modules/gower/fix-pyproject_toml.patch new file mode 100644 index 000000000000..bcc95340cc70 --- /dev/null +++ b/pkgs/development/python-modules/gower/fix-pyproject_toml.patch @@ -0,0 +1,11 @@ +diff --git a/pyproject.toml b/pyproject.toml +index dc396ba..d12ba41 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -18,4 +18,5 @@ classifiers = [ + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ] ++dynamic = ["license", "dependencies"] + + [project.urls] \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c66cb7c38c7d..6375b3a719a9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5407,6 +5407,8 @@ self: super: with self; { goveelights = callPackage ../development/python-modules/goveelights { }; + gower = callPackage ../development/python-modules/gower { }; + gpapi = callPackage ../development/python-modules/gpapi { }; gpaw = callPackage ../development/python-modules/gpaw { };