python310Packages.ninja: init at 0.6

This commit is contained in:
happysalada 2023-07-12 23:36:31 +08:00 committed by Yt
parent 742d4148b5
commit 79c848fd13
2 changed files with 101 additions and 0 deletions

View File

@ -0,0 +1,99 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonRelaxDepsHook
, ninja
# build inputs
, pillow
, matplotlib
, pycocotools
, termcolor
, yacs
, tabulate
, cloudpickle
, tqdm
, tensorboard
, fvcore
, iopath
, omegaconf
, hydra-core
, black
, packaging
# optional dependencies
, fairscale
, timm
, scipy
, shapely
, pygments
, psutil
}:
let
name = "detectron2";
version = "0.6";
optional-dependencies = {
all = [
fairscale
timm
scipy
shapely
pygments
psutil
];
};
in
buildPythonPackage {
inherit name version;
src = fetchFromGitHub {
owner = "facebookresearch";
repo = name;
rev = "v${version}";
sha256 = "1w6cgvc8r2lwr72yxicls650jr46nriv1csivp2va9k1km8jx2sf";
};
nativeBuildInputs = [
pythonRelaxDepsHook
ninja
];
dontUseNinjaBuild = true;
dontUseNinjaInstall = true;
dontUseNinjaCheck = true;
pythonRelaxDeps = [
"black"
];
propagatedBuildInputs = [
pillow
matplotlib
pycocotools
termcolor
yacs
tabulate
cloudpickle
tqdm
tensorboard
fvcore
iopath
omegaconf
hydra-core
black
packaging
] ++ optional-dependencies.all;
passthru.optional-dependencies = optional-dependencies;
# disable the tests for now until someone can check on a linux machine.
# doCheck = false;
pythonImportsCheck = [ "detectron2" ];
meta = with lib; {
description = "Facebooks's next-generation platform for object detection, segmentation and other visual recognition tasks";
homepage = "https://github.com/facebookresearch/detectron2";
license = licenses.asl20;
maintainers = with maintainers; [ happysalada ];
};
}

View File

@ -2571,6 +2571,8 @@ self: super: with self; {
detect-secrets = callPackage ../development/python-modules/detect-secrets { };
detectron2 = callPackage ../development/python-modules/detectron2 { };
devito = callPackage ../development/python-modules/devito { };
devolo-home-control-api = callPackage ../development/python-modules/devolo-home-control-api { };