From d5f7451fa3359f21e258dcc83defb1f6beef6e2f Mon Sep 17 00:00:00 2001 From: C-Achard Date: Tue, 11 Apr 2023 20:13:28 +0200 Subject: [PATCH] Bump version --- MANIFEST.in | 5 +++-- napari_cellseg3d/code_plugins/plugin_helper.py | 8 +++++--- pyproject.toml | 5 ++++- setup.cfg | 7 +++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 5b2bf4c6..c87be433 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,8 +1,9 @@ include LICENSE include README.md include requirements.txt -include napari_cellseg3d/res/*.png -include napari_cellseg3d/code_models/models/pretrained/*.json +include napari.yaml +recursive-include res *.png +recursive-include code_models *.json recursive-exclude * __pycache__ recursive-exclude * *.py[co] diff --git a/napari_cellseg3d/code_plugins/plugin_helper.py b/napari_cellseg3d/code_plugins/plugin_helper.py index 96e0e292..acd7dbb7 100644 --- a/napari_cellseg3d/code_plugins/plugin_helper.py +++ b/napari_cellseg3d/code_plugins/plugin_helper.py @@ -23,9 +23,11 @@ def __init__(self, viewer: "napari.viewer.Viewer"): self.repo_url = "https://github.com/AdaptiveMotorControlLab/CellSeg3d" self._viewer = viewer - path = pathlib.Path(__file__).parent.resolve() - url = str(path) + "../res/logo_alpha.png" - image = QPixmap(url) + logo_path = str( + pathlib.Path(__file__).parent.resolve() / "../res/logo_alpha.png" + ) + print(logo_path) + image = QPixmap(logo_path) self.logo_label = ui.Button(func=lambda: ui.open_url(self.repo_url)) self.logo_label.setIcon(QIcon(image)) diff --git a/pyproject.toml b/pyproject.toml index 0581628b..2c1f76e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,11 +33,14 @@ dependencies = [ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" +[tool.setuptools] +include-package-data = true + [tool.setuptools.packages.find] where = ["."] [tool.setuptools.package-data] -"*" = ["napari_cellseg3d/res/*.png", "napari_cellseg3d/code_models/models/pretrained/*.json", "*.yaml"] +"*" = ["res/*.png", "code_models/models/pretrained/*.json", "*.yaml"] [tool.ruff] # Never enforce `E501` (line length violations). diff --git a/setup.cfg b/setup.cfg index 1fe48379..0a5836c4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,11 +64,10 @@ install_requires = where = . [options.package_data] -* = - napari_cellseg3d/res/*.png - napari_cellseg3d/code_models/models/pretrained/*.json +napari-cellseg3d = + res/*.png + code_models/models/pretrained/*.json napari.yaml -napari-cellseg3d = napari.yaml [options.entry_points] napari.manifest =