summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/django-js-asset')
-rw-r--r--dev-python/django-js-asset/Manifest2
-rw-r--r--dev-python/django-js-asset/django-js-asset-1.2.2.ebuild33
-rw-r--r--dev-python/django-js-asset/django-js-asset-2.2.0.ebuild36
-rw-r--r--dev-python/django-js-asset/files/django-js-asset-1.2.2-fix-django3.patch55
-rw-r--r--dev-python/django-js-asset/metadata.xml7
5 files changed, 43 insertions, 90 deletions
diff --git a/dev-python/django-js-asset/Manifest b/dev-python/django-js-asset/Manifest
index 6a029054963b..2296ee76e2a1 100644
--- a/dev-python/django-js-asset/Manifest
+++ b/dev-python/django-js-asset/Manifest
@@ -1 +1 @@
-DIST django-js-asset-1.2.2.gh.tar.gz 6367 BLAKE2B 5b24d3a2cf1ca2b28b82e581541dcb58aa2bf25d99f865007730c00211452dc5a062dc014b47fd1d10020d2a0b8f74060910460dec4f95be2b83c5c6d7bfb4d2 SHA512 ad2c51399da9b5d75305c0fa257cc75496df3f6704a827a0d297a4d762712039c3ebd921afbe6e10672626f1badd8637728292dd700ba41c4192c95ec73095a9
+DIST django_js_asset-2.2.0.tar.gz 7904 BLAKE2B 2200ffec739325e01070c53247eb613162bbb09447ea370d3c74bd721c0431cac78e188ac826b6292281b48adfff6789faafdc5c606121262b11c90aeb1900b3 SHA512 23a415fcbc76b9885a1b2831ec87ba64e79019b5595e3865c283c4e558e4cd986b5ab39f25e07308575320684dcc449e1d2029b8f145955f448a9f70bae34951
diff --git a/dev-python/django-js-asset/django-js-asset-1.2.2.ebuild b/dev-python/django-js-asset/django-js-asset-1.2.2.ebuild
deleted file mode 100644
index 5704b6a31f05..000000000000
--- a/dev-python/django-js-asset/django-js-asset-1.2.2.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-DESCRIPTION="script tag with additional attributes for django.forms.Media"
-HOMEPAGE="https://github.com/matthiask/django-js-asset"
-SRC_URI="
- https://github.com/matthiask/django-js-asset/archive/${PV}.tar.gz
- -> ${P}.gh.tar.gz
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=dev-python/django-1.17[${PYTHON_USEDEP}]"
-BDEPEND="test? ( ${RDEPEND} )"
-
-PATCHES=(
- "${FILESDIR}/${P}-fix-django3.patch"
-)
-
-python_test() {
- cd tests || die
- local -x DJANGO_SETTINGS_MODULE=testapp.settings
- django-admin test -v 2 || die
-}
diff --git a/dev-python/django-js-asset/django-js-asset-2.2.0.ebuild b/dev-python/django-js-asset/django-js-asset-2.2.0.ebuild
new file mode 100644
index 000000000000..94a57b485d5b
--- /dev/null
+++ b/dev-python/django-js-asset/django-js-asset-2.2.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Script tag with additional attributes for django.forms.Media"
+HOMEPAGE="
+ https://github.com/matthiask/django-js-asset/
+ https://pypi.org/project/django-js-asset/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/django-3.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ )
+"
+
+python_test() {
+ cd tests || die
+ local -x DJANGO_SETTINGS_MODULE=testapp.settings
+ "${EPYTHON}" manage.py test -v 2 || die "Tests failed with ${EPYTHON}"
+}
diff --git a/dev-python/django-js-asset/files/django-js-asset-1.2.2-fix-django3.patch b/dev-python/django-js-asset/files/django-js-asset-1.2.2-fix-django3.patch
deleted file mode 100644
index 4ab0484b17e0..000000000000
--- a/dev-python/django-js-asset/files/django-js-asset-1.2.2-fix-django3.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 232536ba50a2e1a0cffc6046dbcdfdec22cb0d9e Mon Sep 17 00:00:00 2001
-From: Matthias Kestenholz <mk@feinheit.ch>
-Date: Fri, 15 May 2020 08:51:33 +0200
-Subject: [PATCH] Adapt the test suite to changes in Django
-
---- a/tests/testapp/test_js_asset.py
-+++ b/tests/testapp/test_js_asset.py
-@@ -1,11 +1,15 @@
- from __future__ import unicode_literals
-
-+import django
- from django.forms import Media
- from django.test import TestCase
-
- from js_asset.js import JS
-
-
-+JS_TYPE = ' type="text/javascript"' if django.VERSION < (3, 1) else ""
-+
-+
- class AssetTest(TestCase):
- def test_asset(self):
- media = Media(
-@@ -25,15 +29,17 @@ def test_asset(self):
- html,
- )
- self.assertInHTML(
-- '<script type="text/javascript" src="/static/app/test.js"></script>', # noqa
-+ '<script{} src="/static/app/test.js"></script>'.format(JS_TYPE), # noqa
- html,
- )
- self.assertInHTML(
-- '<script type="text/javascript" src="/static/app/asset.js" data-the-answer="42" id="asset-script"></script>', # noqa
-+ '<script{} src="/static/app/asset.js" data-the-answer="42" id="asset-script"></script>'.format( # noqa
-+ JS_TYPE
-+ ),
- html,
- )
- self.assertInHTML(
-- '<script type="text/javascript" src="/static/app/asset-without.js"></script>', # noqa
-+ '<script{} src="/static/app/asset-without.js"></script>'.format(JS_TYPE),
- html,
- )
-
-@@ -42,7 +48,9 @@ def test_absolute(self):
- html = "%s" % media
-
- self.assertInHTML(
-- '<script type="text/javascript" src="https://cdn.example.org/script.js"></script>', # noqa
-+ '<script{} src="https://cdn.example.org/script.js"></script>'.format(
-+ JS_TYPE
-+ ),
- html,
- )
-
diff --git a/dev-python/django-js-asset/metadata.xml b/dev-python/django-js-asset/metadata.xml
index 039080e9bc24..fa3194cddf60 100644
--- a/dev-python/django-js-asset/metadata.xml
+++ b/dev-python/django-js-asset/metadata.xml
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches/>
<upstream>
+ <remote-id type="github">matthiask/django-js-asset</remote-id>
<remote-id type="pypi">django-js-asset</remote-id>
</upstream>
</pkgmetadata>