Commit 78aca25a authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python3Packages.hydra-joblib-launcher: disable on python>=3.14

parent 6c507fd8
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonAtLeast,

  # build-system
  setuptools,
@@ -14,20 +14,23 @@
  pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "hydra-joblib-launcher";
  pyproject = true;

  inherit (hydra-core) version src;

  sourceRoot = "${src.name}/plugins/hydra_joblib_launcher";
  # _pickle.PicklingError: Could not pickle the task to send it to the workers
  disabled = pythonAtLeast "3.14";

  sourceRoot = "${finalAttrs.src.name}/plugins/hydra_joblib_launcher";

  # get rid of deprecated "read_version" dependency, no longer in Nixpkgs:
  postPatch = ''
    substituteInPlace pyproject.toml --replace-fail ', "read-version"' ""
    substituteInPlace setup.py  \
      --replace-fail 'from read_version import read_version' ""  \
      --replace-fail 'version=read_version("hydra_plugins/hydra_joblib_launcher", "__init__.py"),' 'version="${version}",'
      --replace-fail 'version=read_version("hydra_plugins/hydra_joblib_launcher", "__init__.py"),' 'version="${finalAttrs.version}",'
  '';

  build-system = [
@@ -52,4 +55,4 @@ buildPythonPackage rec {
    homepage = "https://hydra.cc/docs/plugins/joblib_launcher";
    maintainers = with lib.maintainers; [ bcdarwin ];
  };
}
})