hatch-django-collectstatic 0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,8 @@
1
+ from hatchling.plugin import hookimpl
2
+
3
+ from .plugin import DjangoCollectstaticBuildHook
4
+
5
+
6
+ @hookimpl
7
+ def hatch_register_build_hook():
8
+ return DjangoCollectstaticBuildHook
@@ -0,0 +1,35 @@
1
+ import importlib
2
+ import sys
3
+ from pathlib import Path
4
+
5
+ from django import setup
6
+ from django.contrib.staticfiles.management.commands.collectstatic import Command
7
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
8
+
9
+
10
+ class DjangoCollectstaticBuildHook(BuildHookInterface):
11
+ PLUGIN_NAME = "django-collectstatic"
12
+
13
+ def initialize(self, version, build_data):
14
+ from django.conf import settings
15
+
16
+ sys.path.insert(0, str(Path(self.root) / "src"))
17
+ project_settings = importlib.import_module(self.config["settings"])
18
+
19
+ settings.configure(
20
+ INSTALLED_APPS=project_settings.INSTALLED_APPS,
21
+ STATIC_ROOT="static",
22
+ STATIC_URL=project_settings.STATIC_URL,
23
+ )
24
+ setup()
25
+ collectstatic_command = Command()
26
+ collectstatic_command.handle(
27
+ interactive=False,
28
+ verbosity=1,
29
+ link=False,
30
+ clear=False,
31
+ dry_run=False,
32
+ ignore_patterns=[],
33
+ use_default_ignore_patterns=True,
34
+ post_process=True,
35
+ )
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: hatch-django-collectstatic
3
+ Version: 0.0.2
4
+ Summary: Build, collect and distribute django static files
5
+ Project-URL: Homepage, https://adnoto.net/
6
+ Project-URL: Issues, https://adnoto.net/
7
+ Author-email: Charles Roelli <charles@adnoto.net>
8
+ License-Expression: MIT
9
+ License-File: LICENSE.txt
10
+ Keywords: collectstatic,django,hatch,hatchling
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Framework :: Hatch
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Build Tools
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: django
18
+ Requires-Dist: hatchling
19
+ Description-Content-Type: text/markdown
20
+
21
+ # hatch-django-collectstatic
22
+
23
+ Collect a django project's static files into its binary distribution
24
+ archive.
25
+
26
+ Example usage:
27
+
28
+ ```
29
+ [build-system]
30
+ requires = ["hatchling >= 1.26", "hatch-django-collectstatic"]
31
+ build-backend = "hatchling.build"
32
+
33
+ [tool.hatch.build.targets.wheel.hooks.django-collectstatic]
34
+ settings = "ppr.project.settings"
35
+
36
+ [tool.hatch.build.targets.wheel.shared-data]
37
+ "static" = "share/static"
38
+ ```
@@ -0,0 +1,8 @@
1
+ hatch_django_collectstatic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ hatch_django_collectstatic/hooks.py,sha256=gq6mZl--oIrhRWFC6wHRcsLcBjX5xq5YUdQE_kYEKbQ,173
3
+ hatch_django_collectstatic/plugin.py,sha256=_xsnGKVEBn-8NjLPFlLFNw9FGxI_S6CLo4hUVCfmuy8,1087
4
+ hatch_django_collectstatic-0.0.2.dist-info/METADATA,sha256=kWi2Zgxf-bUVjgeHSJ9N9PCfeTI0fKmMvA5W9GFpXQ0,1110
5
+ hatch_django_collectstatic-0.0.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ hatch_django_collectstatic-0.0.2.dist-info/entry_points.txt,sha256=zXCUMxeithRnPl1TJJc8WpIKpV9zaRTQJHIHUsa6R2I,64
7
+ hatch_django_collectstatic-0.0.2.dist-info/licenses/LICENSE.txt,sha256=e5qakhHSx7CsBaOrkuA_g66pdXGyh1jLQ2PQ8hqogdw,1071
8
+ hatch_django_collectstatic-0.0.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [hatch]
2
+ django-collectstatic = hatch_django_collectstatic.hooks
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Charles Roelli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.