Skip to content

Commit

Permalink
dev-python/django-js-asset: Fix building with hatchling-1.19
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/919785
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Dec 12, 2023
1 parent 95ddeba commit 1bf4629
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dev-python/django-js-asset/django-js-asset-2.1.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ BDEPEND="
)
"

PATCHES=(
# https://github.com/matthiask/django-js-asset/pull/12
"${FILESDIR}/${P}-hatchling.patch"
)

python_test() {
cd tests || die
local -x DJANGO_SETTINGS_MODULE=testapp.settings
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 440ad305e76a0a948e0df54eb9b92b59c1ac9cb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
Date: Tue, 12 Dec 2023 18:17:50 +0100
Subject: [PATCH] Fix building with hatchling-1.19

Explicitly specify package name, as hatchling-1.19 now does not include
packages that do not match the project name by default, and raises
an error instead.
---
pyproject.toml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/pyproject.toml b/pyproject.toml
index cf963d8..478d8fc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -42,6 +42,9 @@ tests = [
[project.urls]
Homepage = "https://github.com/matthiask/django-js-asset/"

+[tool.hatch.build.targets.wheel]
+packages = ["js_asset"]
+
[tool.hatch.version]
path = "js_asset/__init__.py"

--
2.43.0

0 comments on commit 1bf4629

Please sign in to comment.