public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/django-js-asset/files/, dev-python/django-js-asset/
@ 2021-10-03  8:23 Arthur Zamarin
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Zamarin @ 2021-10-03  8:23 UTC (permalink / raw
  To: gentoo-commits

commit:     483b351863737a94b3e5871678dd45b40ba815ae
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  3 07:06:41 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Oct  3 08:22:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=483b3518

dev-python/django-js-asset: enable py3.10, cleanup tests

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/django-js-asset/Manifest                |  2 +-
 .../django-js-asset/django-js-asset-1.2.2.ebuild   | 23 ++++++---
 .../files/django-js-asset-1.2.2-fix-django3.patch  | 55 ++++++++++++++++++++++
 3 files changed, 73 insertions(+), 7 deletions(-)

diff --git a/dev-python/django-js-asset/Manifest b/dev-python/django-js-asset/Manifest
index 75fad6dc707..6a029054963 100644
--- a/dev-python/django-js-asset/Manifest
+++ b/dev-python/django-js-asset/Manifest
@@ -1 +1 @@
-DIST django-js-asset-1.2.2.tar.gz 4436 BLAKE2B e6b2ff1b2b90da5ae95af08b28eb1970e6e0edffee7eeec0a4697855040c4afd0febcc569d0a78c46bca80835b404367c426019016e5089b3aed984916e13cc2 SHA512 ea050c5093abd8312733b1402e275fcb44f0702c27e28aeb64d0470a8514cd85906707915556a9878b669c96918813c4bf2b69d281d33f18fcc7c143f8ae9f48
+DIST django-js-asset-1.2.2.gh.tar.gz 6367 BLAKE2B 5b24d3a2cf1ca2b28b82e581541dcb58aa2bf25d99f865007730c00211452dc5a062dc014b47fd1d10020d2a0b8f74060910460dec4f95be2b83c5c6d7bfb4d2 SHA512 ad2c51399da9b5d75305c0fa257cc75496df3f6704a827a0d297a4d762712039c3ebd921afbe6e10672626f1badd8637728292dd700ba41c4192c95ec73095a9

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
index 16175edec80..5704b6a31f0 100644
--- 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
@@ -3,20 +3,31 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} )
+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="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="
+	https://github.com/matthiask/django-js-asset/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
 
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64"
-RESTRICT="test"
+IUSE="test"
+RESTRICT="!test? ( test )"
 
 RDEPEND=">=dev-python/django-1.17[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="test? ( dev-python/coverage[${PYTHON_USEDEP}] )"
+BDEPEND="test? ( ${RDEPEND} )"
 
-distutils_enable_tests setup.py
+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/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
new file mode 100644
index 00000000000..4ab0484b17e
--- /dev/null
+++ b/dev-python/django-js-asset/files/django-js-asset-1.2.2-fix-django3.patch
@@ -0,0 +1,55 @@
+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,
+         )
+ 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/django-js-asset/files/, dev-python/django-js-asset/
@ 2023-12-12 17:21 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-12-12 17:21 UTC (permalink / raw
  To: gentoo-commits

commit:     1bf46292200463ff64e6004e5bdfa5271b10822a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 12 17:20:55 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 12 17:21:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bf46292

dev-python/django-js-asset: Fix building with hatchling-1.19

Closes: https://bugs.gentoo.org/919785
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../django-js-asset/django-js-asset-2.1.0.ebuild   |  5 ++++
 .../files/django-js-asset-2.1.0-hatchling.patch    | 29 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/dev-python/django-js-asset/django-js-asset-2.1.0.ebuild b/dev-python/django-js-asset/django-js-asset-2.1.0.ebuild
index 94a57b485d5b..524084cf255c 100644
--- a/dev-python/django-js-asset/django-js-asset-2.1.0.ebuild
+++ b/dev-python/django-js-asset/django-js-asset-2.1.0.ebuild
@@ -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

diff --git a/dev-python/django-js-asset/files/django-js-asset-2.1.0-hatchling.patch b/dev-python/django-js-asset/files/django-js-asset-2.1.0-hatchling.patch
new file mode 100644
index 000000000000..194d97192b3c
--- /dev/null
+++ b/dev-python/django-js-asset/files/django-js-asset-2.1.0-hatchling.patch
@@ -0,0 +1,29 @@
+From 440ad305e76a0a948e0df54eb9b92b59c1ac9cb9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+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
+


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/django-js-asset/files/, dev-python/django-js-asset/
@ 2023-12-13  4:38 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-12-13  4:38 UTC (permalink / raw
  To: gentoo-commits

commit:     c5900902f013076210b2dc4278b436367baecc32
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 13 04:31:44 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec 13 04:38:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5900902

dev-python/django-js-asset: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/django-js-asset/Manifest                |  1 -
 .../django-js-asset/django-js-asset-2.1.0.ebuild   | 41 ----------------------
 .../files/django-js-asset-2.1.0-hatchling.patch    | 29 ---------------
 3 files changed, 71 deletions(-)

diff --git a/dev-python/django-js-asset/Manifest b/dev-python/django-js-asset/Manifest
index c08b4e36d99c..2296ee76e2a1 100644
--- a/dev-python/django-js-asset/Manifest
+++ b/dev-python/django-js-asset/Manifest
@@ -1,2 +1 @@
-DIST django_js_asset-2.1.0.tar.gz 7734 BLAKE2B a3bc41ea91721cb7a91749b0e682352b9d527ab5c2c493eaef42d63f9443975924efae3a2abf1df1bf3fdf8a339036cc67e8a881f3f0aca0f4eec1cfc5589904 SHA512 d2e80bccd173c09b2401e8d6b202d5526afaf17089d0855849a7eb2ad66525b9a171eb134fdc28fabb3dc701f89e88740312c2e34326d5aa42cd7510502384cc
 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-2.1.0.ebuild b/dev-python/django-js-asset/django-js-asset-2.1.0.ebuild
deleted file mode 100644
index 524084cf255c..000000000000
--- a/dev-python/django-js-asset/django-js-asset-2.1.0.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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}
-	)
-"
-
-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
-	"${EPYTHON}" manage.py test -v 2 || die "Tests failed with ${EPYTHON}"
-}

diff --git a/dev-python/django-js-asset/files/django-js-asset-2.1.0-hatchling.patch b/dev-python/django-js-asset/files/django-js-asset-2.1.0-hatchling.patch
deleted file mode 100644
index 194d97192b3c..000000000000
--- a/dev-python/django-js-asset/files/django-js-asset-2.1.0-hatchling.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 440ad305e76a0a948e0df54eb9b92b59c1ac9cb9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-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
-


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-13  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13  4:38 [gentoo-commits] repo/gentoo:master commit in: dev-python/django-js-asset/files/, dev-python/django-js-asset/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2023-12-12 17:21 Michał Górny
2021-10-03  8:23 Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox