diff --git a/pkgs/development/python-modules/gstools-cython/default.nix b/pkgs/development/python-modules/gstools-cython/default.nix new file mode 100644 index 000000000000..b26692f51392 --- /dev/null +++ b/pkgs/development/python-modules/gstools-cython/default.nix @@ -0,0 +1,54 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + cython, + extension-helpers, + numpy, + setuptools, + setuptools-scm, + pytestCheckHook, + pytest-cov-stub, +}: + +buildPythonPackage rec { + pname = "gstools-cython"; + version = "1.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "GeoStat-Framework"; + repo = "GSTools-Cython"; + tag = "v${version}"; + hash = "sha256-Kzn/ThLjTGy3ZYIkTwCV1wi22c7rWo4u/L3llppC6wQ="; + }; + + build-system = [ + cython + extension-helpers + numpy + setuptools + setuptools-scm + ]; + + dependencies = [ + numpy + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ]; + + pythonImportsCheck = [ + "gstools_cython" + ]; + + meta = { + description = "Cython backend for GSTools"; + homepage = "https://github.com/GeoStat-Framework/GSTools-Cython"; + changelog = "https://github.com/GeoStat-Framework/GSTools-Cython/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.lgpl3Only; + maintainers = with lib.maintainers; [ sarahec ]; + }; +} diff --git a/pkgs/development/python-modules/gstools/default.nix b/pkgs/development/python-modules/gstools/default.nix index 73e748056632..d1084e8425e8 100644 --- a/pkgs/development/python-modules/gstools/default.nix +++ b/pkgs/development/python-modules/gstools/default.nix @@ -5,44 +5,47 @@ # build-system cython, - extension-helpers, - numpy, - setuptools, - setuptools-scm, + hatch-vcs, + hatchling, # dependencies - hankel, emcee, + gstools-cython, + hankel, meshio, + numpy, pyevtk, scipy, + # optional dependencies + matplotlib, + pyvista, + # tests pytestCheckHook, + pytest-cov-stub, }: buildPythonPackage rec { pname = "gstools"; - version = "1.6.1"; + version = "1.7.0"; pyproject = true; src = fetchFromGitHub { owner = "GeoStat-Framework"; repo = "GSTools"; tag = "v${version}"; - hash = "sha256-Aieuk0Xjlut8rTZoFHcBpPtyIj/fstMrHiiKyDOpQlg="; + hash = "sha256-rQ7mSa1BWAaRiiE6aQD6jl8BktihY9bjFJV+5eT9n/M="; }; build-system = [ - cython - extension-helpers - numpy - setuptools - setuptools-scm + hatch-vcs + hatchling ]; dependencies = [ emcee + gstools-cython hankel meshio numpy @@ -50,13 +53,23 @@ buildPythonPackage rec { scipy ]; + optional-dependencies = { + plotting = [ + matplotlib + pyvista + ]; + }; + pythonImportsCheck = [ "gstools" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ] ++ lib.flatten (lib.attrValues optional-dependencies); meta = { description = "Geostatistical toolbox"; homepage = "https://github.com/GeoStat-Framework/GSTools"; - changelog = "https://github.com/GeoStat-Framework/GSTools/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/GeoStat-Framework/GSTools/blob/${src.tag}/CHANGELOG.md"; license = lib.licenses.lgpl3Only; maintainers = with lib.maintainers; [ sigmanificient ]; }; diff --git a/pkgs/development/python-modules/pykrige/default.nix b/pkgs/development/python-modules/pykrige/default.nix index 41e928f5587d..984847a47c0c 100644 --- a/pkgs/development/python-modules/pykrige/default.nix +++ b/pkgs/development/python-modules/pykrige/default.nix @@ -31,6 +31,11 @@ buildPythonPackage rec { hash = "sha256-9f8SNlt4qiTlXgx2ica9Y8rmnYzQ5VarvFRfoZ9bSsY="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0.0rc1,<2.3; python_version >= '3.9'" "numpy>=2.0.0"; + ''; + build-system = [ cython numpy diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f9c97b2259a0..28aa7a7dddb1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6294,6 +6294,8 @@ self: super: with self; { gstools = callPackage ../development/python-modules/gstools { }; + gstools-cython = callPackage ../development/python-modules/gstools-cython { }; + gtfs-realtime-bindings = callPackage ../development/python-modules/gtfs-realtime-bindings { }; gto = callPackage ../development/python-modules/gto { };