Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 pythonOlder, 5 lib, 6 cmake, 7 setuptools, 8 typing-extensions, 9 pybind11, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "optree"; 15 version = "0.12.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "metaopt"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-4GvB9Z7qnEjsUSl+x5wd8czV80F50MwJdlNdylUU0zY="; 25 }; 26 27 dontUseCmakeConfigure = true; 28 29 propagatedBuildInputs = [ typing-extensions ]; 30 nativeBuildInputs = [ 31 setuptools 32 pybind11 33 cmake 34 ]; 35 36 nativeCheckInputs = [ pytestCheckHook ]; 37 # prevent import failures from pytest 38 preCheck = '' 39 rm -r optree 40 ''; 41 disabledTests = [ 42 # Fails because the 'test_treespec' module can't be found 43 "test_treespec_pickle_missing_registration" 44 ]; 45 pythonImportsCheck = [ "optree" ]; 46 47 meta = with lib; { 48 homepage = "https://github.com/metaopt/optree"; 49 changelog = "https://github.com/metaopt/optree/releases/tag/v${version}"; 50 description = "Optimized PyTree Utilities"; 51 maintainers = with maintainers; [ pandapip1 ]; 52 license = licenses.asl20; 53 }; 54}