From 24620978588a4a09a79a96b3446397d005654493 Mon Sep 17 00:00:00 2001 From: Simon Babovic Date: Tue, 20 Aug 2024 20:55:43 +0200 Subject: [PATCH 1/2] maintainers: add simonbabovic --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index cdf210160d3c5..0b3f0b7c6e90b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19037,6 +19037,13 @@ github = "Simarra"; githubId = 14372987; }; + simonbabovic = { + name = "Simon Babovic"; + email = "simon@babovic.at"; + matrix = "@simon:babovic.at"; + github = "SimShady"; + githubId = 18537405; + }; simonchatts = { email = "code@chatts.net"; github = "simonchatts"; From df2e781e36e8c168903dec27abc8f9f54410aec3 Mon Sep 17 00:00:00 2001 From: Simon Babovic Date: Tue, 20 Aug 2024 20:58:51 +0200 Subject: [PATCH 2/2] python3Packages.scikit-network: init at 0.33.0 --- .../python-modules/scikit-network/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/scikit-network/default.nix diff --git a/pkgs/development/python-modules/scikit-network/default.nix b/pkgs/development/python-modules/scikit-network/default.nix new file mode 100644 index 0000000000000..e72bd829cd3c1 --- /dev/null +++ b/pkgs/development/python-modules/scikit-network/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + pythonOlder, + cython, + setuptools, + numpy, + scipy, + pytestCheckHook, +}: +buildPythonPackage rec { + pname = "scikit-network"; + version = "0.33.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchPypi { + inherit version; + pname = "scikit-network"; + hash = "sha256-9/fMAutCZ7Fqk4P2RiYVLlm6Q11td7GjVmW2/BvPVy0="; + }; + + # can be removed if https://github.com/sknetwork-team/scikit-network/pull/581 is merged + # pytest-runner actually is not a setup requirement + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "__builtins__.__NUMPY_SETUP__ = False" "__builtins__['__NUMPY_SETUP__'] = False" \ + --replace-fail "setup_requirements = ['pytest-runner']" "setup_requirements = []" + ''; + + build-system = [ + cython + setuptools + numpy + scipy + ]; + + dependencies = [ + numpy + scipy + ]; + + # See https://github.com/NixOS/nixpkgs/issues/255262 + preCheck = '' + cd $out + ''; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "sknetwork" ]; + + meta = { + description = "Free software library in Python for machine learning on graphs"; + changelog = "https://github.com/sknetwork-team/scikit-network/blob/v${version}/HISTORY.rst"; + homepage = "https://scikit-network.readthedocs.io"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ simonbabovic ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ce3728ea525aa..acd1f35cdc386 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14156,6 +14156,8 @@ self: super: with self; { scikit-misc = callPackage ../development/python-modules/scikit-misc { }; + scikit-network = callPackage ../development/python-modules/scikit-network { }; + scikit-optimize = callPackage ../development/python-modules/scikit-optimize { }; scikit-posthocs = callPackage ../development/python-modules/scikit-posthocs { };