1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 distlib, 6 pythonOlder, 7 exceptiongroup, 8 hatch-vcs, 9 hatchling, 10 cattrs, 11 cmake, 12 ninja, 13 packaging, 14 pathspec, 15 pyproject-metadata, 16 pytest-subprocess, 17 pytestCheckHook, 18 setuptools, 19 tomli, 20 virtualenv, 21 wheel, 22}: 23 24buildPythonPackage rec { 25 pname = "scikit-build-core"; 26 version = "0.8.2"; 27 pyproject = true; 28 29 src = fetchPypi { 30 pname = "scikit_build_core"; 31 inherit version; 32 hash = "sha256-UOwkuVaMmqbicjPe6yl4kyvHmFYhKzBXXL+kBJZVxDY="; 33 }; 34 35 postPatch = lib.optionalString (pythonOlder "3.11") '' 36 substituteInPlace pyproject.toml \ 37 --replace '"error",' '"error", "ignore::UserWarning",' 38 ''; 39 40 nativeBuildInputs = [ 41 hatch-vcs 42 hatchling 43 ]; 44 45 propagatedBuildInputs = 46 [ packaging ] 47 ++ lib.optionals (pythonOlder "3.11") [ 48 exceptiongroup 49 tomli 50 ]; 51 52 passthru.optional-dependencies = { 53 pyproject = [ 54 distlib 55 pathspec 56 pyproject-metadata 57 ]; 58 }; 59 60 dontUseCmakeConfigure = true; 61 62 nativeCheckInputs = [ 63 cattrs 64 cmake 65 ninja 66 pytest-subprocess 67 pytestCheckHook 68 setuptools 69 virtualenv 70 wheel 71 ] ++ passthru.optional-dependencies.pyproject; 72 73 disabledTestPaths = [ 74 # runs pip, requires network access 75 "tests/test_custom_modules.py" 76 "tests/test_pyproject_pep517.py" 77 "tests/test_pyproject_pep518.py" 78 "tests/test_pyproject_pep660.py" 79 "tests/test_setuptools_pep517.py" 80 "tests/test_setuptools_pep518.py" 81 # store permissions issue in Nix: 82 "tests/test_editable.py" 83 ]; 84 85 pythonImportsCheck = [ "scikit_build_core" ]; 86 87 meta = with lib; { 88 description = "A next generation Python CMake adaptor and Python API for plugins"; 89 homepage = "https://github.com/scikit-build/scikit-build-core"; 90 changelog = "https://github.com/scikit-build/scikit-build-core/releases/tag/v${version}"; 91 license = with licenses; [ asl20 ]; 92 maintainers = with maintainers; [ veprbl ]; 93 }; 94}