depot/third_party/nixpkgs/pkgs/development/python-modules/apricot-select/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

69 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, numba
, numpy
, pynose
, pytestCheckHook
, pythonOlder
, scikit-learn
, scipy
, setuptools
, torchvision
, tqdm
}:
buildPythonPackage rec {
pname = "apricot-select";
version = "0.6.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jmschrei";
repo = "apricot";
rev = "refs/tags/${version}";
hash = "sha256-v9BHFxmlbwXVipPze/nV35YijdFBuka3gAl85AlsffQ=";
};
postPatch = ''
sed -i '/"nose"/d' setup.py
'';
build-system = [
setuptools
];
dependencies = [
numba
numpy
scipy
tqdm
];
nativeCheckInputs = [
pynose
pytestCheckHook
scikit-learn
torchvision
];
pythonImportsCheck = [
"apricot"
];
disabledTestPaths = [
# Tests require nose
"tests/test_optimizers/test_knapsack_facility_location.py"
"tests/test_optimizers/test_knapsack_feature_based.py"
];
meta = with lib; {
description = "Module for submodular optimization for the purpose of selecting subsets of massive data sets";
homepage = "https://github.com/jmschrei/apricot";
changelog = "https://github.com/jmschrei/apricot/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}