1{ lib
2, buildPythonPackage
3, setuptools-scm
4, pythonOlder
5, pythonRelaxDepsHook
6, fetchFromGitHub
7, pytestCheckHook
8, pytest-xdist
9, numpy
10, numba
11, typing-extensions
12}:
13
14buildPythonPackage rec {
15 pname = "galois";
16 version = "0.3.6";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "mhostetter";
23 repo = "galois";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-Lt55HUTBmrg0IX9oWUdh5zyxccViKq0X+9bhDEgUZjQ=";
26 };
27
28 SETUPTOOLS_SCM_PRETEND_VERSION = version;
29
30 nativeBuildInputs = [
31 setuptools-scm
32 pythonRelaxDepsHook
33 ];
34
35 propagatedBuildInputs = [
36 numpy
37 numba
38 typing-extensions
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 pytest-xdist
44 ];
45
46 pythonRelaxDeps = [ "numpy" "numba" ];
47
48 pythonImportsCheck = [ "galois" ];
49
50 meta = with lib; {
51 description = "Python package that extends NumPy arrays to operate over finite fields";
52 homepage = "https://github.com/mhostetter/galois";
53 changelog = "https://github.com/mhostetter/galois/releases/tag/v${version}";
54 downloadPage = "https://github.com/mhostetter/galois/releases/tag/v${version}";
55 license = licenses.mit;
56 maintainers = with maintainers; [ chrispattison ];
57 };
58}