include static assets in build
This commit is contained in:
parent
de4420ac37
commit
06c44e8f7d
2 changed files with 16 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ where = ["."]
|
|||
include = ["repub*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
repub = ["sql/*.sql"]
|
||||
repub = ["sql/*.sql", "static/*.css", "static/*.js"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
|
|
|||
15
tests/test_packaging.py
Normal file
15
tests/test_packaging.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_pyproject_includes_static_assets_in_package_data() -> None:
|
||||
pyproject_path = Path(__file__).resolve().parents[1] / "pyproject.toml"
|
||||
config = tomllib.loads(pyproject_path.read_text(encoding="utf-8"))
|
||||
|
||||
package_data = config["tool"]["setuptools"]["package-data"]["repub"]
|
||||
|
||||
assert "sql/*.sql" in package_data
|
||||
assert "static/*.css" in package_data
|
||||
assert "static/*.js" in package_data
|
||||
Loading…
Add table
Add a link
Reference in a new issue