diff --git a/pyproject.toml b/pyproject.toml index 3ec78a7..7741398 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ dependencies = ["blosc2", "numpy", "trogon", "unsync", + "wakepy>0.7", ] classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/src/ensembl_lite/cli.py b/src/ensembl_lite/cli.py index 947744e..4684022 100644 --- a/src/ensembl_lite/cli.py +++ b/src/ensembl_lite/cli.py @@ -8,7 +8,7 @@ try: - import wakepy.keep.running as keep_running + from wakepy.keep import running as keep_running except ImportError: from ensembl_lite._util import fake_wake as keep_running @@ -34,6 +34,15 @@ from ensembl_lite._species import Species +try: + # trap flaky behaviour on linux + with keep_running(): + ... + +except NotImplementedError: + from ensembl_lite._util import fake_wake as keep_running + + def _get_installed_config_path(ctx, param, path) -> os.PathLike: """path to installed.cfg""" path = pathlib.Path(path)