depot/third_party/nixpkgs/pkgs/development/python-modules/galois/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

58 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, setuptools-scm
, pythonOlder
, pythonRelaxDepsHook
, fetchFromGitHub
, pytestCheckHook
, pytest-xdist
, numpy
, numba
, typing-extensions
}:
buildPythonPackage rec {
pname = "galois";
version = "0.3.5";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mhostetter";
repo = "galois";
rev = "refs/tags/v${version}";
hash = "sha256-4eYDaQwjnYCTnobXRtFrToRyxxH2N2n9sh8z7oPC2Wc=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
pythonRelaxDepsHook
];
propagatedBuildInputs = [
numpy
numba
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
pytest-xdist
];
pythonRelaxDeps = [ "numpy" "numba" ];
pythonImportsCheck = [ "galois" ];
meta = with lib; {
description = "Python package that extends NumPy arrays to operate over finite fields";
homepage = "https://github.com/mhostetter/galois";
changelog = "https://github.com/mhostetter/galois/releases/tag/v${version}";
downloadPage = "https://github.com/mhostetter/galois/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ chrispattison ];
};
}