From 01483d6aaa4c6fc9a1e0fb48f46e73287b094b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 19 Aug 2024 14:48:30 -0700 Subject: [PATCH] python312Packages.mdtraj: fix build --- .../python-modules/mdtraj/default.nix | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/mdtraj/default.nix b/pkgs/development/python-modules/mdtraj/default.nix index 5cca00165cfb..a51d21a08fbb 100644 --- a/pkgs/development/python-modules/mdtraj/default.nix +++ b/pkgs/development/python-modules/mdtraj/default.nix @@ -21,6 +21,7 @@ pytest-xdist, pytestCheckHook, tables, + pythonAtLeast, }: buildPythonPackage rec { @@ -36,25 +37,6 @@ buildPythonPackage rec { }; patches = [ - (fetchpatch { - name = "gsd_3-compatibility.patch"; - url = "https://github.com/mdtraj/mdtraj/commit/81209d00817ab07cfc4668bf5ec88088d16904c0.patch"; - hash = "sha256-ttNmij7csxF0Z5wPPwhGumRX055W2IgFjRAe6nI6GNY="; - }) - # remove pkg_resources usage - # https://github.com/mdtraj/mdtraj/pull/1837 - (fetchpatch { - name = "fix-runtime-error.patch"; - url = "https://github.com/mdtraj/mdtraj/commit/02d44d4db7039fceb199c85b4f993244804f470d.patch"; - hash = "sha256-nhbi3iOrDSM87DyIp1KVt383Vvb6aYOgkjuYzviqiq8="; - }) - # remove distutils usage - # https://github.com/mdtraj/mdtraj/pull/1834 - (fetchpatch { - name = "python312-compatibility.patch"; - url = "https://github.com/mdtraj/mdtraj/commit/95d79747deef42c976ca362a57806b61933409f3.patch"; - hash = "sha256-Cq7/d745q6ZgAyWGM4ULnSsWezsbnu1CjSz5eqYSb+g="; - }) # disable intrinsics when SIMD is not available # TODO: enable SIMD with python3.12 # https://github.com/mdtraj/mdtraj/pull/1884 @@ -113,6 +95,13 @@ buildPythonPackage rec { "test_precentered_2" ]; + # these files import distutils + # remove once https://github.com/mdtraj/mdtraj/pull/1916 is merged + disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [ + "test_mol2.py" + "test_netcdf.py" + ]; + pythonImportsCheck = [ "mdtraj" ]; meta = with lib; {