python312Packages.scikits-odes: 2.7.0 -> 3.1.0 (#369846)

This commit is contained in:
OTABI Tomoya
2025-01-10 18:26:19 +09:00
committed by GitHub
5 changed files with 142 additions and 40 deletions
@@ -0,0 +1,35 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "scikits-odes-core";
version = "3.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "bmcage";
repo = "odes";
tag = "v${version}";
hash = "sha256-wOdqRzj45piT9P+qA0xXBCnOZ9Xh+Waej2t51mDcilc=";
};
sourceRoot = "${src.name}/packages/scikits-odes-core";
build-system = [ setuptools ];
pythonImportsCheck = [ "scikits_odes_core" ];
# no tests
doCheck = false;
meta = {
description = "Core support module for scikits-odes";
homepage = "https://github.com/bmcage/odes/blob/master/packages/scikits-odes-core";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ idontgetoutmuch ];
};
}
@@ -0,0 +1,37 @@
{
buildPythonPackage,
gfortran,
meson-python,
numpy,
scikits-odes-core,
}:
buildPythonPackage rec {
inherit (scikits-odes-core) version src;
pname = "scikits-odes-daepack";
pyproject = true;
sourceRoot = "${src.name}/packages/scikits-odes-daepack";
build-system = [
meson-python
numpy
];
nativeBuildInputs = [ gfortran ];
dependencies = [
numpy
scikits-odes-core
];
pythonImportsCheck = [ "scikits_odes_daepack" ];
# no tests
doCheck = false;
meta = scikits-odes-core.meta // {
description = "Wrapper around daepack";
homepage = "https://github.com/bmcage/odes/blob/master/packages/scikits-odes-daepack";
};
}
@@ -0,0 +1,41 @@
{
buildPythonPackage,
sundials,
cython,
numpy,
pkgconfig,
setuptools,
scikits-odes-core,
pytestCheckHook,
}:
buildPythonPackage rec {
inherit (scikits-odes-core) version src;
pname = "scikits-odes-sundials";
pyproject = true;
sourceRoot = "${src.name}/packages/scikits-odes-sundials";
build-system = [
cython
numpy
pkgconfig
setuptools
];
buildInputs = [ sundials ];
dependencies = [
numpy
scikits-odes-core
];
pythonImportsCheck = [ "scikits_odes_sundials" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = scikits-odes-core.meta // {
description = "Sundials wrapper module for scikits-odes";
homepage = "https://github.com/bmcage/odes/blob/master/packages/scikits-odes-sundials";
};
}
@@ -1,59 +1,42 @@
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
pythonAtLeast,
cython,
enum34,
gfortran,
isPy27,
isPy3k,
numpy,
pytest,
python,
setuptools,
scipy,
sundials,
scikits-odes-core,
scikits-odes-daepack,
scikits-odes-sundials,
pytestCheckHook,
}:
buildPythonPackage rec {
inherit (scikits-odes-core) version src;
pname = "scikits.odes";
version = "2.7.0";
pyproject = true;
# https://github.com/bmcage/odes/issues/130
disabled = isPy27 || pythonAtLeast "3.12";
sourceRoot = "${src.name}/packages/scikits-odes";
src = fetchPypi {
inherit pname version;
hash = "sha256-px4Z4UhYk3VK6MBQZoIy/MaU8XuDYC51++v3v5+XXh4=";
};
build-system = [ setuptools ];
nativeBuildInputs = [
gfortran
cython
dependencies = [
scipy
scikits-odes-core
scikits-odes-daepack
scikits-odes-sundials
];
propagatedBuildInputs = [
numpy
sundials
scipy
] ++ lib.optionals (!isPy3k) [ enum34 ];
pythonImportsCheck = [ "scikits_odes" ];
nativeCheckInputs = [ pytest ];
nativeCheckInputs = [ pytestCheckHook ];
checkPhase = ''
cd $out/${python.sitePackages}/scikits/odes/tests
pytest
'';
disabledTests = lib.optionals stdenv.hostPlatform.isAarch64 [
# skip on aarch64, see https://github.com/bmcage/odes/issues/101
"test_lsodi"
];
meta = with lib; {
meta = scikits-odes-core.meta // {
description = "Scikit offering extra ode/dae solvers, as an extension to what is available in scipy";
homepage = "https://github.com/bmcage/odes";
license = licenses.bsd3;
maintainers = with maintainers; [ idontgetoutmuch ];
platforms = [
"aarch64-linux"
"x86_64-linux"
"x86_64-darwin"
];
homepage = "https://github.com/bmcage/odes/blob/master/packages/scikits-odes";
};
}
+6
View File
@@ -14488,6 +14488,12 @@ self: super: with self; {
scikits-odes = callPackage ../development/python-modules/scikits-odes { };
scikits-odes-core = callPackage ../development/python-modules/scikits-odes-core { };
scikits-odes-daepack = callPackage ../development/python-modules/scikits-odes-daepack { };
scikits-odes-sundials = callPackage ../development/python-modules/scikits-odes-sundials { };
scikit-tda = callPackage ../development/python-modules/scikit-tda { };
scipy = callPackage ../development/python-modules/scipy { };