Unverified Commit 7f420707 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

precice: 3.2.0-unstable-2025-05-23 -> 3.3.0; python3Packages.pyprecice: 3.2.1 -> 3.3.1 (#453610)

parents 939f7916 052419cf
Loading
Loading
Loading
Loading
+27 −10
Original line number Diff line number Diff line
@@ -3,29 +3,32 @@
  stdenv,
  fetchFromGitHub,
  cmake,
  pkg-config,
  boost,
  eigen,
  libxml2,
  mpi,
  python3Packages,
  petsc,
  pkg-config,
  ctestCheckHook,
  mpiCheckPhaseHook,
}:

stdenv.mkDerivation {
assert petsc.mpiSupport;

stdenv.mkDerivation (finalAttrs: {
  pname = "precice";
  version = "3.2.0-unstable-2025-05-23";
  version = "3.3.0";

  src = fetchFromGitHub {
    owner = "precice";
    repo = "precice";
    rev = "6ee3e347843d4d3c416a32917f6505d35b822445";
    hash = "sha256-BxNAbpeLqJPzQ9dvvgC9jJQQFBdVMunSqIekz7SIHv4=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-1FbTNo2F+jH1EVV6gXc9o0T31UHY/wBK3vQeCV7wW5E=";
  };

  cmakeFlags = [
    (lib.cmakeBool "PRECICE_PETScMapping" false)
    (lib.cmakeBool "BUILD_SHARED_LIBS" true)
    (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
  ];

  nativeBuildInputs = [
@@ -43,12 +46,26 @@ stdenv.mkDerivation {
    python3Packages.numpy
  ];

  __darwinAllowLocalNetworking = true;

  doCheck = true;

  nativeCheckInputs = [
    ctestCheckHook
    mpiCheckPhaseHook
  ];

  disabledTests = [
    # Because preciceDt becomes very small. Test is likely to fail on other platform.
    "precice.Integration/Serial/Time/Explicit/ParallelCoupling/ReadWriteScalarDataWithSubcycling6400Steps"
  ];

  meta = {
    description = "PreCICE stands for Precise Code Interaction Coupling Environment";
    homepage = "https://precice.org/";
    license = with lib.licenses; [ gpl3 ];
    license = with lib.licenses; [ lgpl3Only ];
    maintainers = with lib.maintainers; [ Scriptkiddi ];
    mainProgram = "binprecice";
    mainProgram = "precice-tools";
    platforms = lib.platforms.unix;
  };
}
})
+11 −11
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@

  # build-system
  cython,
  pip,
  pkgconfig,
  setuptools,
  setuptools-git-versioning,

  # dependencies
  mpi4py,
@@ -17,38 +17,38 @@

buildPythonPackage rec {
  pname = "pyprecice";
  version = "3.2.1";
  version = "3.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "precice";
    repo = "python-bindings";
    tag = "v${version}";
    hash = "sha256-8AM2wbPX54UaMO4MzLOV0TljLTAPOqR9gUbtT2McNjs=";
    hash = "sha256-NkTrMZ7UKB5O2jIlhLhgkOm8ZeWJA1FoursA1df7XOk=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "setuptools>=61,<72" "setuptools"
  '';

  build-system = [
    cython
    pip
    pkgconfig
    setuptools
    setuptools-git-versioning
  ];

  dependencies = [
    numpy
    mpi4py
  ];

  buildInputs = [
    precice
  ];

  # Disable Test because everything depends on open mpi which requires network
  # no official test instruction
  doCheck = false;

  # Do not use pythonImportsCheck because this will also initialize mpi which requires a network interface
  pythonImportsCheck = [
    "precice"
  ];

  meta = {
    description = "Python language bindings for preCICE";