Martin Weinelt 2024-08-23 14:43:23 +02:00
parent 091e358978
commit 53158decf5
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
4 changed files with 37 additions and 36 deletions

View File

@ -28,7 +28,7 @@ buildPythonPackage rec {
ninja
pybind11
scikit-build-core
] ++ scikit-build-core.optional-dependencies.pyproject;
];
dependencies = [ numpy ];

View File

@ -38,7 +38,7 @@ buildPythonPackage rec {
pathspec
ninja
pyproject-metadata
] ++ scikit-build-core.optional-dependencies.pyproject;
];
propagatedBuildInputs = [ numpy ];

View File

@ -44,7 +44,7 @@ buildPythonPackage rec {
ninja
pybind11
scikit-build-core
] ++ scikit-build-core.optional-dependencies.pyproject;
];
dontUseCmakeConfigure = true;

View File

@ -1,18 +1,25 @@
{
lib,
buildPythonPackage,
fetchPypi,
distlib,
fetchFromGitHub,
pythonOlder,
exceptiongroup,
# build-system
hatch-vcs,
hatchling,
cattrs,
cmake,
ninja,
# dependencies
packaging,
pathspec,
pyproject-metadata,
exceptiongroup,
# tests
build,
cattrs,
numpy,
pybind11,
pytest-subprocess,
pytestCheckHook,
setuptools,
@ -23,62 +30,56 @@
buildPythonPackage rec {
pname = "scikit-build-core";
version = "0.9.6";
version = "0.10.5";
pyproject = true;
src = fetchPypi {
pname = "scikit_build_core";
inherit version;
hash = "sha256-e+r5M89zSsvrttlsApNlQQIkcJvN5o87C08MsD4FSTk=";
src = fetchFromGitHub {
owner = "scikit-build";
repo = "scikit-build-core";
rev = "refs/tags/v${version}";
hash = "sha256-hpwXEWPofgMT4ua2tZI1mtGbaBkT2XPBd6QL8xTi1A0=";
};
postPatch = lib.optionalString (pythonOlder "3.11") ''
substituteInPlace pyproject.toml \
--replace '"error",' '"error", "ignore::UserWarning",'
--replace-fail '"error",' '"error", "ignore::UserWarning",'
'';
nativeBuildInputs = [
build-system = [
hatch-vcs
hatchling
];
propagatedBuildInputs =
[ packaging ]
dependencies =
[
packaging
pathspec
]
++ lib.optionals (pythonOlder "3.11") [
exceptiongroup
tomli
];
passthru.optional-dependencies = {
pyproject = [
distlib
pathspec
pyproject-metadata
];
};
dontUseCmakeConfigure = true;
nativeCheckInputs = [
build
cattrs
cmake
ninja
numpy
pybind11
pytest-subprocess
pytestCheckHook
setuptools
virtualenv
wheel
] ++ passthru.optional-dependencies.pyproject;
];
# cmake is only used for tests
dontUseCmakeConfigure = true;
pytestFlagsArray = [ "-m 'not isolated and not network'" ];
disabledTestPaths = [
# runs pip, requires network access
"tests/test_custom_modules.py"
"tests/test_hatchling.py"
"tests/test_pyproject_pep517.py"
"tests/test_pyproject_pep518.py"
"tests/test_pyproject_pep660.py"
"tests/test_setuptools_pep517.py"
"tests/test_setuptools_pep518.py"
# store permissions issue in Nix:
"tests/test_editable.py"
];