2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, cysignals
|
|
|
|
, cython_3
|
2020-04-24 23:36:52 +00:00
|
|
|
, pkgconfig
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
, gmp
|
|
|
|
, pari
|
|
|
|
, mpfr
|
|
|
|
, fplll
|
|
|
|
, numpy
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fpylll";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.6.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fplll";
|
|
|
|
repo = "fpylll";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-EyReCkVRb3CgzIRal5H13OX/UdwWi+evDe7PoS1qP4A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython_3
|
|
|
|
cysignals
|
|
|
|
pkgconfig
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
gmp
|
|
|
|
pari
|
|
|
|
mpfr
|
|
|
|
fplll
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# Since upstream introduced --doctest-modules in
|
|
|
|
# https://github.com/fplll/fpylll/commit/9732fdb40cf1bd43ad1f60762ec0a8401743fc79,
|
|
|
|
# it is necessary to ignore import mismatches. Not sure why, but the files
|
|
|
|
# should be identical anyway.
|
2024-01-13 08:15:51 +00:00
|
|
|
export PY_IGNORE_IMPORTMISMATCH=1
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Python interface for fplll";
|
|
|
|
changelog = "https://github.com/fplll/fpylll/releases/tag/${version}";
|
|
|
|
homepage = "https://github.com/fplll/fpylll";
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = teams.sage.members;
|
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|