1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 # build inputs
7 numpy,
8 yacs,
9 pyyaml,
10 tqdm,
11 termcolor,
12 pillow,
13 tabulate,
14 iopath,
15 shapely,
16 # check inputs
17 torch,
18}:
19let
20 pname = "fvcore";
21 version = "0.1.5.post20221221";
22 optional-dependencies = {
23 all = [ shapely ];
24 };
25in
26buildPythonPackage {
27 inherit pname version;
28 format = "setuptools";
29
30 disabled = pythonOlder "3.7";
31
32 src = fetchPypi {
33 inherit pname version;
34 hash = "sha256-8vsLuQVyrmUcEceOIEk+0ZsiQFUKfku7LW3oe90DeGA=";
35 };
36
37 propagatedBuildInputs = [
38 numpy
39 yacs
40 pyyaml
41 tqdm
42 termcolor
43 pillow
44 tabulate
45 iopath
46 ];
47
48 nativeCheckInputs = [ torch ];
49
50 # TypeError: flop_count() missing 2 required positional arguments: 'model' and 'inputs'
51 doCheck = false;
52
53 pythonImportsCheck = [ "fvcore" ];
54
55 optional-dependencies = optional-dependencies;
56
57 meta = with lib; {
58 description = "Collection of common code that's shared among different research projects in FAIR computer vision team";
59 homepage = "https://github.com/facebookresearch/fvcore";
60 license = licenses.asl20;
61 maintainers = with maintainers; [ happysalada ];
62 };
63}