diff --git a/.gitignore b/.gitignore index d7b30f1..c356ee6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ .pyc __pycache__/ *.egg-info +build +dist diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..ff46f77 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +recursive-include inst * diff --git a/pyproject.toml b/pyproject.toml index 1126387..00d8fa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] -name = "shiny-router" -version = "0.1.0" +name = "shiny_router" +version = "0.1.2" description = "Add your description here" readme = "README.md" requires-python = ">=3.12" @@ -8,3 +8,9 @@ dependencies = [ "pandas", "shiny", ] + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.package-data] +"shiny_router" = ["www/*"] \ No newline at end of file diff --git a/src/shiny_router/__init__.py b/src/shiny_router/__init__.py index b1cd8c2..52ba3ea 100644 --- a/src/shiny_router/__init__.py +++ b/src/shiny_router/__init__.py @@ -1,4 +1,4 @@ from .router import route_link, router_ui, route, router_server def hello() -> str: - return "Hello from shiny-router!" + return "Hello from shiny_router!" diff --git a/src/shiny_router/router.py b/src/shiny_router/router.py index 2e7ee4b..c8669f4 100644 --- a/src/shiny_router/router.py +++ b/src/shiny_router/router.py @@ -109,7 +109,7 @@ def router_ui_internal(router): pkg_dependency = HTMLDependency("shiny_router", "0.0.1", source={ "package": "shiny_router", - "subdir": str(PurePath(__file__).parent.parent.parent / "inst" / "www"), + "subdir": str(PurePath(__file__).parent / "www"), }, script={"src": js_file, "type": "module"}, stylesheet={"href": css_file} diff --git a/src/shiny_router/www b/src/shiny_router/www new file mode 120000 index 0000000..620a902 --- /dev/null +++ b/src/shiny_router/www @@ -0,0 +1 @@ +../../inst/www \ No newline at end of file diff --git a/uv.lock b/uv.lock index 1b1bd25..ceb8609 100644 --- a/uv.lock +++ b/uv.lock @@ -339,7 +339,7 @@ wheels = [ [[distribution]] name = "shiny-router" -version = "0.1.0" +version = "0.1.2" source = { editable = "." } dependencies = [ { name = "pandas" },