Skip to content

Commit 59e9336

Browse files
psaveryjourdain
authored andcommitted
fix: add trame namespace packages
This adds `image_tools` under both `trame.modules` and `trame.widgets`. Signed-off-by: Patrick Avery <[email protected]>
1 parent cebe702 commit 59e9336

File tree

6 files changed

+15
-1
lines changed

6 files changed

+15
-1
lines changed

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ build-backend = 'setuptools.build_meta'
3737

3838
[tool.setuptools.packages.find]
3939
where = ["."]
40+
# Editable installs don't work with the namespace packages if we
41+
# include "trame" in this list. We must explicitly include "trame.modules"
42+
# and "trame.widgets" instead.
43+
include = ["trame.modules", "trame.widgets", "trame_image_tools"]
4044

4145
[tool.setuptools.package-data]
4246
trame_image_tools = [
@@ -72,7 +76,6 @@ ignore = []
7276
fixable = ["ALL"]
7377
unfixable = []
7478

75-
7679
[tool.ruff.format]
7780
quote-style = "double"
7881
indent-style = "space"

trame/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

trame/modules/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

trame/modules/image_tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from trame_image_tools.module import * # noqa: F403

trame/widgets/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

trame/widgets/image_tools.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from trame_image_tools.widgets import * # noqa: F403
2+
3+
4+
def initialize(server):
5+
from trame_image_tools import module
6+
7+
server.enable_module(module)

0 commit comments

Comments
 (0)