Skip to content

Commit 7d07717

Browse files
committed
fix: include template dirs in the data files
1 parent 631c1d3 commit 7d07717

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

codeforlife/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
BASE_DIR = Path(__file__).resolve().parent
2020
DATA_DIR = BASE_DIR.joinpath("data")
21+
TEMPLATES_DIR = BASE_DIR.joinpath("templates")
2122
USER_DIR = BASE_DIR.joinpath("user")
2223

2324

codeforlife/user/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
from .. import USER_DIR
77

88
FIXTURES_DIR = USER_DIR.joinpath("fixtures")
9+
TEMPLATES_DIR = USER_DIR.joinpath("templates")

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212

1313
from setuptools import find_packages, setup # type: ignore[import-untyped]
1414

15-
from codeforlife import DATA_DIR, __version__
15+
from codeforlife import DATA_DIR, TEMPLATES_DIR, __version__
1616
from codeforlife.user import FIXTURES_DIR as USER_FIXTURES_DIR
17+
from codeforlife.user import TEMPLATES_DIR as USER_TEMPLATES_DIR
1718

1819
# Get the absolute path of the package.
1920
PACKAGE_DIR = os.path.dirname(__file__)
@@ -91,7 +92,12 @@ def parse_requirements(packages: t.Dict[str, t.Dict[str, t.Any]]):
9192
# TODO: exclude test files
9293
packages=find_packages(exclude=["tests", "tests.*"]),
9394
include_package_data=True,
94-
data_files=[get_data_files(DATA_DIR), get_data_files(USER_FIXTURES_DIR)],
95+
data_files=[
96+
get_data_files(DATA_DIR),
97+
get_data_files(USER_FIXTURES_DIR),
98+
get_data_files(TEMPLATES_DIR),
99+
get_data_files(USER_TEMPLATES_DIR),
100+
],
95101
package_data={"codeforlife": ["py.typed"]},
96102
python_requires="==3.12.*",
97103
install_requires=install_requires,

0 commit comments

Comments
 (0)