From 21f5ba16fa2142efeace8f70577599fa93e90e76 Mon Sep 17 00:00:00 2001 From: Thomas Cokelaer Date: Fri, 29 Dec 2023 14:39:10 +0100 Subject: [PATCH] update __init__ (version) --- MANIFEST.in | 7 ------- README.rst | 1 + conda.yml | 3 --- pyproject.toml | 2 +- sequana_pipelines/fastqc/__init__.py | 16 +++++++++++----- 5 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 conda.yml diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 3af15e8..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -recursive-exclude * __pycache__ -recursive-exclude * *pyc -recursive-include * *rules -include requirements*txt -include README.rst -prune test -prune doc diff --git a/README.rst b/README.rst index 03168da..abb2dae 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,7 @@ Changelog ========= ==================================================================== Version Description ========= ==================================================================== +1.8.1 * update __init__ (version) 1.8.0 * uses pyproject instead of setuptools * uses click instead of argparse and newest sequana_pipetools (0.16.0) diff --git a/conda.yml b/conda.yml deleted file mode 100644 index d05f733..0000000 --- a/conda.yml +++ /dev/null @@ -1,3 +0,0 @@ -fastqc -falco -graphviz diff --git a/pyproject.toml b/pyproject.toml index 2c9d245..b720376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "sequana-fastqc" -version = "1.8.0" +version = "1.8.1" description = "A multi-sample fastqc pipeline from Sequana project" authors = ["Sequana Team"] license = "BSD-3" diff --git a/sequana_pipelines/fastqc/__init__.py b/sequana_pipelines/fastqc/__init__.py index d98707f..f13da5c 100644 --- a/sequana_pipelines/fastqc/__init__.py +++ b/sequana_pipelines/fastqc/__init__.py @@ -1,6 +1,12 @@ -import pkg_resources -try: - version = pkg_resources.require("sequana_fastqc")[0].version -except: - version = ">=0.8.0" +import importlib.metadata as metadata + +def get_package_version(package_name): + try: + version = metadata.version(package_name) + return version + except metadata.PackageNotFoundError: + return f"{package_name} not found" + + +version = get_package_version("sequana-fastqc")