1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 hatch-vcs, 9 hatchling, 10 cmake, 11 ninja, 12 13 # dependencies 14 packaging, 15 pathspec, 16 exceptiongroup, 17 18 # tests 19 build, 20 cattrs, 21 numpy, 22 pybind11, 23 pytest-subprocess, 24 pytestCheckHook, 25 setuptools, 26 tomli, 27 virtualenv, 28 wheel, 29}: 30 31buildPythonPackage rec { 32 pname = "scikit-build-core"; 33 version = "0.11.1"; 34 pyproject = true; 35 36 src = fetchFromGitHub { 37 owner = "scikit-build"; 38 repo = "scikit-build-core"; 39 rev = "refs/tags/v${version}"; 40 hash = "sha256-Tn4IyVbDNImSMOwL17D3W9I+mWS1aaTHr0LRR+in+IY="; 41 }; 42 43 postPatch = lib.optionalString (pythonOlder "3.11") '' 44 substituteInPlace pyproject.toml \ 45 --replace-fail '"error",' '"error", "ignore::UserWarning",' 46 ''; 47 48 build-system = [ 49 hatch-vcs 50 hatchling 51 ]; 52 53 dependencies = 54 [ 55 packaging 56 pathspec 57 ] 58 ++ lib.optionals (pythonOlder "3.11") [ 59 exceptiongroup 60 tomli 61 ]; 62 63 nativeCheckInputs = [ 64 build 65 cattrs 66 cmake 67 ninja 68 numpy 69 pybind11 70 pytest-subprocess 71 pytestCheckHook 72 setuptools 73 virtualenv 74 wheel 75 ]; 76 77 # cmake is only used for tests 78 dontUseCmakeConfigure = true; 79 80 pytestFlagsArray = [ "-m 'not isolated and not network'" ]; 81 82 disabledTestPaths = [ 83 # store permissions issue in Nix: 84 "tests/test_editable.py" 85 ]; 86 87 pythonImportsCheck = [ "scikit_build_core" ]; 88 89 meta = with lib; { 90 description = "Next generation Python CMake adaptor and Python API for plugins"; 91 homepage = "https://github.com/scikit-build/scikit-build-core"; 92 changelog = "https://github.com/scikit-build/scikit-build-core/blob/${src.rev}/docs/about/changelog.md"; 93 license = with licenses; [ asl20 ]; 94 maintainers = with maintainers; [ veprbl ]; 95 }; 96}