From a0b0a4ac298264e9e712a32bbe39006ed4aa537e Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 15:48:42 -0500 Subject: [PATCH] python3Packages.scikit-build-core: init at 0.1.3 --- .../scikit-build-core/default.nix | 83 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 85 insertions(+) create mode 100644 pkgs/development/python-modules/scikit-build-core/default.nix diff --git a/pkgs/development/python-modules/scikit-build-core/default.nix b/pkgs/development/python-modules/scikit-build-core/default.nix new file mode 100644 index 000000000000..802b50cab32f --- /dev/null +++ b/pkgs/development/python-modules/scikit-build-core/default.nix @@ -0,0 +1,83 @@ +{ lib +, buildPythonPackage +, fetchPypi +, distlib +, pythonOlder +, exceptiongroup +, hatch-vcs +, hatchling +, cattrs +, cmake +, packaging +, pathspec +, pyproject-metadata +, pytest-subprocess +, pytestCheckHook +, tomli +}: + +buildPythonPackage rec { + pname = "scikit-build-core"; + version = "0.1.3"; + format = "pyproject"; + + src = fetchPypi { + pname = "scikit_build_core"; + inherit version; + hash = "sha256-qkVj7fS2+JB8mpJ788vTw4jhD/TGtZAMtCiBlmjbFM8="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'minversion = "7.2"' "" \ + --replace '"error",' '"error", "ignore::DeprecationWarning", "ignore::UserWarning",' + ''; + + nativeBuildInputs = [ + hatch-vcs + hatchling + ]; + + propagatedBuildInputs = [ + packaging + ] ++ lib.optionals (pythonOlder "3.11") [ + exceptiongroup + tomli + ]; + + passthru.optional-dependencies = { + pyproject = [ + distlib + pathspec + pyproject-metadata + ]; + }; + + dontUseCmakeConfigure = true; + + checkInputs = [ + cattrs + cmake + pytest-subprocess + pytestCheckHook + ] ++ passthru.optional-dependencies.pyproject; + + disabledTestPaths = [ + # runs pip, requires network access + "tests/test_pyproject_pep517.py" + "tests/test_pyproject_pep518.py" + "tests/test_setuptools_pep517.py" + "tests/test_setuptools_pep518.py" + ]; + + pythonImportsCheck = [ + "scikit_build_core" + ]; + + meta = with lib; { + description = "A next generation Python CMake adaptor and Python API for plugins"; + homepage = "https://github.com/scikit-build/scikit-build-core"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 511fea250077..de6eaebcaeac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10080,6 +10080,8 @@ self: super: with self; { scikit-build = callPackage ../development/python-modules/scikit-build { }; + scikit-build-core = callPackage ../development/python-modules/scikit-build-core { }; + scikit-fmm = callPackage ../development/python-modules/scikit-fmm { }; scikit-fuzzy = callPackage ../development/python-modules/scikit-fuzzy { };