Skip to content

Commit

Permalink
python312Packages.pyprecice: cleanup and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Feb 4, 2025
1 parent c187ed8 commit 147900d
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions pkgs/development/python-modules/pyprecice/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,50 @@
{
lib,
buildPythonPackage,
setuptools,
pip,
cython,
fetchFromGitHub,

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

# dependencies
mpi4py,
numpy,
precice,
pkgconfig,
pythonOlder,
}:

buildPythonPackage rec {
pname = "pyprecice";
version = "3.1.2";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "precice";
repo = "python-bindings";
tag = "v${version}";
hash = "sha256-/atuMJVgvY4kgvrB+LuQZmJuSK4O8TJdguC7NCiRS2Y=";
};

nativeBuildInputs = [
setuptools
pip
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools>=61,<72" "setuptools" \
--replace-fail "numpy<2" "numpy"
'';

build-system = [
cython
pip
pkgconfig
setuptools
];

pythonRelaxDeps = [
"numpy"
];

propagatedBuildInputs = [
dependencies = [
numpy
mpi4py
precice
Expand All @@ -44,10 +55,11 @@ buildPythonPackage rec {

# Do not use pythonImportsCheck because this will also initialize mpi which requires a network interface

meta = with lib; {
meta = {
description = "Python language bindings for preCICE";
homepage = "https://github.com/precice/python-bindings";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ Scriptkiddi ];
changelog = "https://github.com/precice/python-bindings/blob/v${version}/CHANGELOG.md";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ Scriptkiddi ];
};
}

0 comments on commit 147900d

Please sign in to comment.