2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
2023-05-24 13:37:59 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-forked
|
|
|
|
, py
|
|
|
|
, python
|
2020-05-29 06:06:01 +00:00
|
|
|
, six }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "lazy-import";
|
2020-05-29 06:06:01 +00:00
|
|
|
version = "0.2.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "lazy_import";
|
|
|
|
inherit version;
|
2020-05-29 06:06:01 +00:00
|
|
|
sha256 = "0gca9xj60qr3aprj9qdc66crr4r7hl8wzv6gc9y40nclazwawj91";
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-forked
|
|
|
|
py
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
preCheck = ''
|
|
|
|
# avoid AttributeError: module 'py' has no attribute 'process'
|
|
|
|
export PYTHONPATH=${py}/${python.sitePackages}:$PYTHONPATH
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--forked"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "A set of functions that load modules, and related attributes, in a lazy fashion";
|
2021-10-01 09:20:50 +00:00
|
|
|
homepage = "https://github.com/mnmelo/lazy_import";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|