2022-07-05 16:17:54 +02:00
|
|
|
{
|
|
|
|
lib,
|
2025-06-04 14:57:15 +02:00
|
|
|
stdenv,
|
2022-07-05 16:17:54 +02:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
2025-05-15 06:36:14 +02:00
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system, dependencies
|
2022-07-05 16:17:54 +02:00
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
pyproject-metadata,
|
|
|
|
tomli,
|
2025-05-15 06:36:14 +02:00
|
|
|
|
|
|
|
# tests
|
|
|
|
cython,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
2022-07-05 16:17:54 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meson-python";
|
2025-05-15 06:21:36 +02:00
|
|
|
version = "0.18.0";
|
2025-05-15 06:36:14 +02:00
|
|
|
pyproject = true;
|
2022-07-05 16:17:54 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "meson_python";
|
2025-05-15 06:21:36 +02:00
|
|
|
hash = "sha256-xWqZ7J32aaQGYv5GlgMhr25LFBBsFNsihwnBYo4jhI0=";
|
2022-07-05 16:17:54 +02:00
|
|
|
};
|
|
|
|
|
2025-05-15 06:36:14 +02:00
|
|
|
build-system = [
|
2022-07-05 16:17:54 +02:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pyproject-metadata
|
2025-05-15 06:36:14 +02:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
2022-07-05 16:17:54 +02:00
|
|
|
|
2025-05-15 06:36:14 +02:00
|
|
|
dependencies = [
|
2022-07-05 16:17:54 +02:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pyproject-metadata
|
2025-05-15 06:36:14 +02:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
cython
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require a Git checkout
|
|
|
|
"test_configure_data"
|
|
|
|
"test_contents"
|
|
|
|
"test_contents"
|
|
|
|
"test_contents_license_file"
|
|
|
|
"test_contents_subdirs"
|
|
|
|
"test_contents_unstaged"
|
|
|
|
"test_detect_wheel_tag_module"
|
|
|
|
"test_detect_wheel_tag_script"
|
|
|
|
"test_dynamic_version"
|
|
|
|
"test_editable_install"
|
|
|
|
"test_editable_verbose"
|
|
|
|
"test_editble_reentrant"
|
|
|
|
"test_entrypoints"
|
|
|
|
"test_executable_bit"
|
|
|
|
"test_executable_bit"
|
|
|
|
"test_generated_files"
|
|
|
|
"test_install_subdir"
|
|
|
|
"test_license_pep639"
|
|
|
|
"test_limited_api"
|
|
|
|
"test_link_library_in_subproject"
|
|
|
|
"test_local_lib"
|
|
|
|
"test_long_path"
|
|
|
|
"test_meson_build_metadata"
|
|
|
|
"test_pep621_metadata"
|
|
|
|
"test_pure"
|
|
|
|
"test_purelib_and_platlib"
|
|
|
|
"test_reproducible"
|
|
|
|
"test_rpath"
|
|
|
|
"test_scipy_like"
|
|
|
|
"test_sharedlib_in_package"
|
|
|
|
"test_symlinks"
|
|
|
|
"test_uneeded_rpath"
|
|
|
|
"test_user_args"
|
|
|
|
"test_vendored_meson"
|
|
|
|
];
|
2025-06-04 14:57:15 +02:00
|
|
|
# meson-python respectes MACOSX_DEPLOYMENT_TARGET, but compares it with the
|
|
|
|
# actual platform version during tests, which mismatches.
|
|
|
|
# https://github.com/mesonbuild/meson-python/issues/760
|
|
|
|
preCheck =
|
|
|
|
if stdenv.hostPlatform.isDarwin then
|
|
|
|
''
|
|
|
|
unset MACOSX_DEPLOYMENT_TARGET
|
|
|
|
''
|
|
|
|
else
|
|
|
|
null;
|
2025-05-15 06:36:14 +02:00
|
|
|
|
2023-07-13 16:13:09 +03:00
|
|
|
setupHooks = [ ./add-build-flags.sh ];
|
2022-07-05 16:17:54 +02:00
|
|
|
|
|
|
|
meta = {
|
2023-01-09 01:19:46 +01:00
|
|
|
changelog = "https://github.com/mesonbuild/meson-python/blob/${version}/CHANGELOG.rst";
|
2022-07-05 16:17:54 +02:00
|
|
|
description = "Meson Python build backend (PEP 517)";
|
2023-01-09 01:19:46 +01:00
|
|
|
homepage = "https://github.com/mesonbuild/meson-python";
|
2022-07-05 16:17:54 +02:00
|
|
|
license = [ lib.licenses.mit ];
|
2024-04-28 12:18:55 +02:00
|
|
|
maintainers = with lib.maintainers; [ doronbehar ];
|
2025-05-15 06:36:14 +02:00
|
|
|
teams = [ lib.teams.python ];
|
2022-07-05 16:17:54 +02:00
|
|
|
};
|
2022-09-15 19:04:03 +02:00
|
|
|
}
|