1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cython,
6 extension-helpers,
7 numpy,
8 setuptools,
9 setuptools-scm,
10 pytestCheckHook,
11 pytest-cov-stub,
12}:
13
14buildPythonPackage rec {
15 pname = "gstools-cython";
16 version = "1.1.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "GeoStat-Framework";
21 repo = "GSTools-Cython";
22 tag = "v${version}";
23 hash = "sha256-Kzn/ThLjTGy3ZYIkTwCV1wi22c7rWo4u/L3llppC6wQ=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace-fail "Cython>=3.0.10,<3.1.0" "Cython>=3.1.0,<4.0.0"
29 '';
30
31 build-system = [
32 cython
33 extension-helpers
34 numpy
35 setuptools
36 setuptools-scm
37 ];
38
39 dependencies = [
40 numpy
41 ];
42
43 nativeCheckInputs = [
44 pytestCheckHook
45 pytest-cov-stub
46 ];
47
48 pythonImportsCheck = [
49 "gstools_cython"
50 ];
51
52 meta = {
53 description = "Cython backend for GSTools";
54 homepage = "https://github.com/GeoStat-Framework/GSTools-Cython";
55 changelog = "https://github.com/GeoStat-Framework/GSTools-Cython/blob/${src.tag}/CHANGELOG.md";
56 license = lib.licenses.lgpl3Only;
57 maintainers = with lib.maintainers; [ sarahec ];
58 };
59}