blob: a0d8b2f049e922f85f9d47a3cdfc3aff6da31629 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# hatch-django-collectstatic
Collect a django project's static files into its binary distribution
archive.
Example usage in `pyproject.toml`:
```toml
[build-system]
requires = ["hatchling >= 1.26", "hatch-django-collectstatic"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel.hooks.django-collectstatic]
settings = "my_django_package.project.settings"
# If you have installed Django apps from packages besides Django,
# you'll need to enable the require-runtime-dependencies feature of
# hatch in order to make these packages available when collecting
# static files.
# Default value of require-runtime-dependencies = false
# require-runtime-dependencies = true
[tool.hatch.build.targets.wheel.shared-data]
# Mapping from output directory to the distribution path. The
# following configuration will place the files in the .data directory
# of the wheel, under "data/share/static".
# See https://packaging.python.org/en/latest/specifications/binary-distribution-format/#the-data-directory
"static" = "share/static"
```
|