Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.scikit-network: init at 0.33.0 #336136

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19037,6 +19037,13 @@
github = "Simarra";
githubId = 14372987;
};
simonbabovic = {
name = "Simon Babovic";
email = "[email protected]";
matrix = "@simon:babovic.at";
github = "SimShady";
githubId = 18537405;
};
simonchatts = {
email = "[email protected]";
github = "simonchatts";
Expand Down
61 changes: 61 additions & 0 deletions pkgs/development/python-modules/scikit-network/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down