Skip to content

Commit fc80efb

Browse files
authored
Merge pull request #27 from StableLlama/relative_paths
Change to use relative paths
2 parents 6231930 + 6266ab7 commit fc80efb

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
"""Top-level package for basic_data_handling."""
2-
import os, sys
3-
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
42

53
__all__ = [
64
"NODE_CLASS_MAPPINGS",
75
"NODE_DISPLAY_NAME_MAPPINGS",
86
"WEB_DIRECTORY",
97
]
108

11-
from src.basic_data_handling import NODE_CLASS_MAPPINGS
12-
from src.basic_data_handling import NODE_DISPLAY_NAME_MAPPINGS
9+
try:
10+
# For ComfyUI
11+
from .src.basic_data_handling import NODE_CLASS_MAPPINGS
12+
from .src.basic_data_handling import NODE_DISPLAY_NAME_MAPPINGS
13+
except ImportError:
14+
# For running tests
15+
from src.basic_data_handling import NODE_CLASS_MAPPINGS
16+
from src.basic_data_handling import NODE_DISPLAY_NAME_MAPPINGS
17+
1318

1419
WEB_DIRECTORY = "./web"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "basic_data_handling"
7-
version = "0.5.0"
7+
version = "0.6.0"
88
description = """Basic Python functions for manipulating data that every programmer is used to, lightweight with no additional dependencies.
99
1010
Supported data types:

0 commit comments

Comments
 (0)