mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-10-27 09:40:40 +00:00
Move data inside package and update references
This commit is contained in:
1 parent
b7af10d89c
commit
2b93da8b7f
31 files changed
+8
-6
No files matched your search
+2
-2
@@ -1,2 +1,2 @@
|
||||
include templates/**
|
||||
include src/**
|
||||
include voxvera/templates/**
|
||||
include voxvera/src/**
|
||||
+1
-1
@@ -10,7 +10,7 @@ include = ["voxvera*"]
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
voxvera = ["../templates/**", "../src/**"]
|
||||
voxvera = ["templates/**", "src/**"]
|
||||
|
||||
[project]
|
||||
name = "voxvera"
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ from voxvera import cli
|
||||
|
||||
def _setup_tmp(monkeypatch, tmp_path):
|
||||
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, "_src_res", lambda *p: tmp_path / "src" / Path(*p))
|
||||
monkeypatch.setattr(cli, "run", lambda *a, **k: None)
|
||||
|
||||
+4
-2
@@ -17,11 +17,13 @@ ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
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:
|
||||
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):
|
||||
|
||||
File renamed without changes.
File renamed without changes.
Executable → Regular
File renamed without changes.
File renamed without changes.
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user