From d8b19009b69b0d3873b50f2fed9ebcd9bb1a5c48 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 4 Jun 2025 14:56:37 +0200 Subject: [PATCH 1/2] python3Packages.meson-python: enable all tests I missed that it wasn't complaining about a missing git repo before, but want to create git repos instead. --- .../python-modules/meson-python/default.nix | 39 +------------------ 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/pkgs/development/python-modules/meson-python/default.nix b/pkgs/development/python-modules/meson-python/default.nix index c3bbdc6276e3..917cdd88e221 100644 --- a/pkgs/development/python-modules/meson-python/default.nix +++ b/pkgs/development/python-modules/meson-python/default.nix @@ -13,6 +13,7 @@ # tests cython, + git, pytestCheckHook, pytest-mock, }: @@ -42,47 +43,11 @@ buildPythonPackage rec { nativeCheckInputs = [ cython + git 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" - ]; # 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 From 8070d9c8beec8a9d8abab150a63ae1885e75222f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 8 Jun 2025 21:28:34 +0200 Subject: [PATCH 2/2] python3Packages.meson-python: replace darwin workaround with upstream patch Benefit is that this will break on the version bump and we'll remember to remove it. --- .../python-modules/meson-python/default.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/meson-python/default.nix b/pkgs/development/python-modules/meson-python/default.nix index 917cdd88e221..6364fc2bf8ce 100644 --- a/pkgs/development/python-modules/meson-python/default.nix +++ b/pkgs/development/python-modules/meson-python/default.nix @@ -1,8 +1,8 @@ { lib, - stdenv, buildPythonPackage, fetchPypi, + fetchpatch, pythonOlder, # build-system, dependencies @@ -29,6 +29,14 @@ buildPythonPackage rec { hash = "sha256-xWqZ7J32aaQGYv5GlgMhr25LFBBsFNsihwnBYo4jhI0="; }; + patches = [ + (fetchpatch { + # TODO: Remove in 0.19.0 + url = "https://github.com/mesonbuild/meson-python/commit/1e69e7a23f2b24d688dc4220e93de6f0e2bcf9d2.patch"; + hash = "sha256-FC2ll/OrLV1R0CDB6UkrknVASJQ7rSU+sApdAk75x44="; + }) + ]; + build-system = [ meson ninja @@ -48,17 +56,6 @@ buildPythonPackage rec { pytest-mock ]; - # 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; - setupHooks = [ ./add-build-flags.sh ]; meta = {