1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 wheel,
9}:
10
11buildPythonPackage rec {
12 pname = "objsize";
13 version = "0.7.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "liran-funaro";
20 repo = "objsize";
21 rev = "refs/tags/${version}";
22 hash = "sha256-wy4Tj+Q+4zymRdoN8Z7wcazJTb2lQ+XHY1Kta02R3R0=";
23 };
24
25 nativeBuildInputs = [
26 setuptools
27 wheel
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "objsize" ];
33
34 pytestFlagsArray = [ "test_objsize.py" ];
35
36 meta = with lib; {
37 description = "Traversal over objects subtree and calculate the total size";
38 homepage = "https://github.com/liran-funaro/objsize";
39 license = licenses.bsd3;
40 maintainers = with maintainers; [ ocfox ];
41 };
42}