Skip to content

Commit

Permalink
python3Packages.scikit-network: init at 0.33.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SimShady committed Aug 22, 2024
1 parent 2462097 commit df2e781
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
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

0 comments on commit df2e781

Please sign in to comment.