Move data inside package and update references
@@ -1,2 +1,2 @@
|
|||||||
include templates/**
|
include voxvera/templates/**
|
||||||
include src/**
|
include voxvera/src/**
|
||||||
|
@@ -10,7 +10,7 @@ include = ["voxvera*"]
|
|||||||
include-package-data = true
|
include-package-data = true
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
[tool.setuptools.package-data]
|
||||||
voxvera = ["../templates/**", "../src/**"]
|
voxvera = ["templates/**", "src/**"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "voxvera"
|
name = "voxvera"
|
||||||
|
@@ -15,7 +15,7 @@ from voxvera import cli
|
|||||||
|
|
||||||
def _setup_tmp(monkeypatch, tmp_path):
|
def _setup_tmp(monkeypatch, tmp_path):
|
||||||
repo_root = Path(__file__).resolve().parent.parent
|
repo_root = Path(__file__).resolve().parent.parent
|
||||||
shutil.copytree(repo_root / "src", tmp_path / "src")
|
shutil.copytree(repo_root / "voxvera" / "src", tmp_path / "src")
|
||||||
monkeypatch.setattr(cli, "ROOT", tmp_path)
|
monkeypatch.setattr(cli, "ROOT", tmp_path)
|
||||||
monkeypatch.setattr(cli, "_src_res", lambda *p: tmp_path / "src" / Path(*p))
|
monkeypatch.setattr(cli, "_src_res", lambda *p: tmp_path / "src" / Path(*p))
|
||||||
monkeypatch.setattr(cli, "run", lambda *a, **k: None)
|
monkeypatch.setattr(cli, "run", lambda *a, **k: None)
|
||||||
|
@@ -17,11 +17,13 @@ ROOT = Path(__file__).resolve().parent.parent
|
|||||||
|
|
||||||
|
|
||||||
def _template_res(*parts) -> Traversable:
|
def _template_res(*parts) -> Traversable:
|
||||||
return resources.files(__package__).joinpath('..', 'templates', *parts)
|
"""Return a Traversable for files under the packaged ``templates`` folder."""
|
||||||
|
return resources.files(__package__).joinpath('templates', *parts)
|
||||||
|
|
||||||
|
|
||||||
def _src_res(*parts) -> Traversable:
|
def _src_res(*parts) -> Traversable:
|
||||||
return resources.files(__package__).joinpath('..', 'src', *parts)
|
"""Return a Traversable for files under the packaged ``src`` folder."""
|
||||||
|
return resources.files(__package__).joinpath('src', *parts)
|
||||||
|
|
||||||
|
|
||||||
def require_cmd(cmd: str):
|
def require_cmd(cmd: str):
|
||||||
|
0
src/create_flyer.sh → voxvera/src/create_flyer.sh
Executable file → Normal file
0
src/generate_qr.sh → voxvera/src/generate_qr.sh
Executable file → Normal file
0
src/import_from_json.sh → voxvera/src/import_from_json.sh
Executable file → Normal file
0
src/obfuscate_index.sh → voxvera/src/obfuscate_index.sh
Executable file → Normal file
0
src/obfuscate_nostr.sh → voxvera/src/obfuscate_nostr.sh
Executable file → Normal file
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |