From c0e5613bacbc4717f399d9c40487e80d4b684786 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Thu, 18 May 2023 20:43:13 -0600 Subject: [PATCH] one more time --- MANIFEST.in | 1 + reactpy_jupyter/__init__.py | 2 +- setup.py | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index f4540c2..2d26971 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,3 +3,4 @@ graft jupyter-config include LICENSE include pyproject.toml +include reactpy_jupyter.pth diff --git a/reactpy_jupyter/__init__.py b/reactpy_jupyter/__init__.py index a36234d..60ea3a6 100644 --- a/reactpy_jupyter/__init__.py +++ b/reactpy_jupyter/__init__.py @@ -10,7 +10,7 @@ from .monkey_patch import execute_patch from .widget_component import from_widget -__version__ = "0.9.4" # DO NOT MODIFY +__version__ = "0.9.5" # DO NOT MODIFY __all__ = ( "from_widget", diff --git a/setup.py b/setup.py index d3538a6..b682d58 100644 --- a/setup.py +++ b/setup.py @@ -162,9 +162,14 @@ def build_javascript_first(cmd: Command): def build_with_pth_file(cmd: Command): + build_lib = getattr(cmd, "build_lib", None) or getattr(cmd, "dist_dir", None) + if build_lib is None: + raise ValueError("Cannot find build_lib or dist_dir") + pth_filename = f"{NAME}.pth" source_pth_file = ROOT_DIR / pth_filename - cmd.copy_file(str(source_pth_file), pth_filename) + target_pth_file = Path(build_lib, pth_filename) + cmd.copy_file(str(source_pth_file), str(target_pth_file)) def add_to_cmd(cls: Command, functions: list[Callable[[Command], None]]) -> Command: