python312Packages.ezyrb: cleanup, fix build (#390341)
This commit is contained in:
@@ -2,22 +2,26 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
future,
|
||||
numpy,
|
||||
scipy,
|
||||
matplotlib,
|
||||
scikit-learn,
|
||||
torch,
|
||||
|
||||
# tests
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ezyrb";
|
||||
version = "1.3.0.post2404";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mathLab";
|
||||
@@ -26,12 +30,27 @@ buildPythonPackage rec {
|
||||
hash = "sha256-nu75Geyeu1nTLoGaohXB9pmbUWKgdgch9Z5OJqz9xKQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# AttributeError: module 'numpy' has no attribute 'VisibleDeprecationWarning'
|
||||
postPatch = ''
|
||||
substituteInPlace \
|
||||
tests/test_k_neighbors_regressor.py \
|
||||
tests/test_linear.py \
|
||||
tests/test_radius_neighbors_regressor.py \
|
||||
--replace-fail \
|
||||
"np.VisibleDeprecationWarning" \
|
||||
"np.exceptions.VisibleDeprecationWarning"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
future
|
||||
numpy
|
||||
scipy
|
||||
matplotlib
|
||||
numpy
|
||||
scikit-learn
|
||||
scipy
|
||||
torch
|
||||
];
|
||||
|
||||
@@ -44,11 +63,11 @@ buildPythonPackage rec {
|
||||
"tests/test_podae.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Easy Reduced Basis method";
|
||||
homepage = "https://mathlab.github.io/EZyRB/";
|
||||
downloadPage = "https://github.com/mathLab/EZyRB/releases";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ yl3dy ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ yl3dy ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,64 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
setuptools-git-versioning,
|
||||
|
||||
# dependencies
|
||||
ezyrb,
|
||||
future,
|
||||
h5netcdf,
|
||||
matplotlib,
|
||||
numpy,
|
||||
pytestCheckHook,
|
||||
pytest-mock,
|
||||
pythonOlder,
|
||||
scipy,
|
||||
ezyrb,
|
||||
xarray,
|
||||
|
||||
# tests
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
let
|
||||
self = buildPythonPackage rec {
|
||||
pname = "pydmd";
|
||||
version = "2025.01.01";
|
||||
pyproject = true;
|
||||
buildPythonPackage rec {
|
||||
pname = "pydmd";
|
||||
version = "2025.03.01";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PyDMD";
|
||||
repo = "PyDMD";
|
||||
tag = version;
|
||||
hash = "sha256-edjBr0LsfyBEi4YZiTY0GegqgESWgSFennZOi2YFhC4=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
future
|
||||
matplotlib
|
||||
numpy
|
||||
scipy
|
||||
ezyrb
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
pytestFlagsArray = [ "tests/test_dmdbase.py" ];
|
||||
|
||||
pythonImportsCheck = [ "pydmd" ];
|
||||
|
||||
passthru.tests = self.overrideAttrs (old: {
|
||||
pytestFlagsArray = [ ];
|
||||
});
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python Dynamic Mode Decomposition";
|
||||
homepage = "https://pydmd.github.io/PyDMD/";
|
||||
changelog = "https://github.com/PyDMD/PyDMD/releases/tag/${src.tag}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ yl3dy ];
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "PyDMD";
|
||||
repo = "PyDMD";
|
||||
tag = version;
|
||||
hash = "sha256-2pfWW+CLSDr6tJrcLpodil/RnhLTZ5Yqw0ThTCqO0MY=";
|
||||
};
|
||||
in
|
||||
self
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools-git-versioning>=2.0,<3" "setuptools-git-versioning"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-git-versioning
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
ezyrb
|
||||
future
|
||||
h5netcdf
|
||||
matplotlib
|
||||
numpy
|
||||
scipy
|
||||
xarray
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pydmd" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Python Dynamic Mode Decomposition";
|
||||
homepage = "https://pydmd.github.io/PyDMD/";
|
||||
changelog = "https://github.com/PyDMD/PyDMD/releases/tag/${src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ yl3dy ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user