summaryrefslogtreecommitdiff
path: root/dev-python/crispy-bootstrap3
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/crispy-bootstrap3')
-rw-r--r--dev-python/crispy-bootstrap3/Manifest1
-rw-r--r--dev-python/crispy-bootstrap3/crispy-bootstrap3-2024.1.ebuild44
-rw-r--r--dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52.patch125
-rw-r--r--dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52Py.patch53
-rw-r--r--dev-python/crispy-bootstrap3/metadata.xml9
5 files changed, 232 insertions, 0 deletions
diff --git a/dev-python/crispy-bootstrap3/Manifest b/dev-python/crispy-bootstrap3/Manifest
new file mode 100644
index 000000000000..5d5b4b260332
--- /dev/null
+++ b/dev-python/crispy-bootstrap3/Manifest
@@ -0,0 +1 @@
+DIST crispy-bootstrap3-2024.1.gh.tar.gz 26766 BLAKE2B 40a90ab97755e72a5e46dfcb7a2763bf21acbb5bb53117c92fa419bcc52d2faf46e189d0b00003c09d1c0d835979a137299f3b7b3a503548efc38e4507415791 SHA512 d647da99f0939e3221130a10ca44eb122be2d7796c0f2d29b4c9c4c8948f8cad788a7218bb59b2ccf032298cc7be177a222e14a924c3f543a77eba73699f0c0e
diff --git a/dev-python/crispy-bootstrap3/crispy-bootstrap3-2024.1.ebuild b/dev-python/crispy-bootstrap3/crispy-bootstrap3-2024.1.ebuild
new file mode 100644
index 000000000000..e5642caa3312
--- /dev/null
+++ b/dev-python/crispy-bootstrap3/crispy-bootstrap3-2024.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2023-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1
+
+DESCRIPTION="Bootstrap3 template pack for django-crispy-forms"
+HOMEPAGE="
+ https://github.com/django-crispy-forms/crispy-bootstrap3/
+ https://pypi.org/project/crispy-bootstrap3/
+"
+SRC_URI="
+ https://github.com/django-crispy-forms/crispy-bootstrap3/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+RDEPEND="
+ >=dev-python/django-5.2[${PYTHON_USEDEP}]
+ >=dev-python/django-crispy-forms-2.0[${PYTHON_USEDEP}]
+"
+
+PATCHES=( "${FILESDIR}"/${P}-django52Py.patch )
+
+python_prepare_all() {
+ pushd tests/results/bootstrap3/test_form_helper 2>/dev/null
+ cp bootstrap_form_show_errors_bs3_true_gte5{0,2}.html || die
+ cp bootstrap_form_show_errors_bs3_false_gte5{0,2}.html || die
+ cp test_form_show_errors_non_field_errors_true_gte5{0,2}.html || die
+ cp test_form_show_errors_non_field_errors_false_gte5{0,2}.html || die
+ popd
+ eapply "${FILESDIR}"/${P}-django52.patch
+ distutils-r1_python_prepare_all
+}
+
+EPYTEST_PLUGINS=( pytest-django )
+distutils_enable_tests pytest
diff --git a/dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52.patch b/dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52.patch
new file mode 100644
index 000000000000..302f0707281d
--- /dev/null
+++ b/dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52.patch
@@ -0,0 +1,125 @@
+--- a/tests/results/bootstrap3/test_form_helper/bootstrap_form_show_errors_bs3_true_gte52.html 2026-05-12 08:54:40.844588615 +0200
++++ b/tests/results/bootstrap3/test_form_helper/bootstrap_form_show_errors_bs3_true_gte52.html 2026-05-12 08:56:08.969609620 +0200
+@@ -3,7 +3,7 @@
+ <label for="id_email" class=" control-label requiredField"> email<span class="asteriskField">*</span> </label>
+ <div class=" controls">
+ <div class="input-group"><input type="text" name="email" value="invalidemail" maxlength="30"
+- aria-describedby="id_email_helptext" aria-invalid="true"
++ aria-describedby="id_email_helptext id_email_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_email" />
+ <span class="input-group-addon">whatever</span></div>
+ <span id="error_1_id_email" class="help-block"><strong>Enter a valid email address.</strong></span>
+@@ -15,7 +15,7 @@
+ <div class=" controls">
+ <div class="input-group">
+ <span class="input-group-addon">blabla</span>
+- <input type="text" name="first_name" value="first_name_too_long" maxlength="5" aria-invalid="true"
++ <input type="text" name="first_name" value="first_name_too_long" maxlength="5" aria-describedby="id_first_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_first_name" />
+ </div>
+
+@@ -27,7 +27,7 @@
+ <div class=" controls">
+ <div class="input-group">
+ <span class="input-group-addon">foo</span>
+- <input type="text" name="last_name" value="last_name_too_long" maxlength="5" aria-invalid="true"
++ <input type="text" name="last_name" value="last_name_too_long" maxlength="5" aria-describedby="id_last_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_last_name" />
+ <span class="input-group-addon">bar</span>
+ </div>
+--- a/tests/results/bootstrap3/test_form_helper/bootstrap_form_show_errors_bs3_false_gte52.html 2026-05-12 08:58:43.242895175 +0200
++++ b/tests/results/bootstrap3/test_form_helper/bootstrap_form_show_errors_bs3_false_gte52.html 2026-05-12 08:59:34.010330008 +0200
+@@ -3,7 +3,7 @@
+ <label for="id_email" class=" control-label requiredField"> email<span class="asteriskField">*</span> </label>
+ <div class=" controls">
+ <div class="input-group"><input type="text" name="email" value="invalidemail" maxlength="30"
+- aria-describedby="id_email_helptext" aria-invalid="true"
++ aria-describedby="id_email_helptext id_email_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_email" />
+ <span class="input-group-addon">whatever</span></div>
+ <div id="hint_id_email" class="help-block">Insert your email</div>
+@@ -14,7 +14,7 @@
+ <div class=" controls">
+ <div class="input-group">
+ <span class="input-group-addon">blabla</span>
+- <input type="text" name="first_name" value="first_name_too_long" maxlength="5" aria-invalid="true"
++ <input type="text" name="first_name" value="first_name_too_long" maxlength="5" aria-describedby="id_first_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_first_name" />
+ </div>
+ </div>
+@@ -24,7 +24,7 @@
+ <div class=" controls">
+ <div class="input-group">
+ <span class="input-group-addon">foo</span>
+- <input type="text" name="last_name" value="last_name_too_long" maxlength="5" aria-invalid="true"
++ <input type="text" name="last_name" value="last_name_too_long" maxlength="5" aria-describedby="id_last_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_last_name" />
+ <span class="input-group-addon">bar</span>
+ </div>
+--- a/tests/results/bootstrap3/test_form_helper/test_form_show_errors_non_field_errors_true_gte52.html 2026-05-12 09:05:52.812112989 +0200
++++ b/tests/results/bootstrap3/test_form_helper/test_form_show_errors_non_field_errors_true_gte52.html 2026-05-12 09:08:58.292049212 +0200
+@@ -11,7 +11,7 @@
+ <div id="div_id_email" class="form-group has-error"> <label for="id_email" class="control-label requiredField">
+ email<span class="asteriskField">*</span> </label>
+ <div class="controls "> <input type="text" name="email" maxlength="30"
+- aria-describedby="id_email_helptext" aria-invalid="true"
++ aria-describedby="id_email_helptext id_email_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_email"> <span id="error_1_id_email"
+ class="help-block"><strong>This field is required.</strong></span>
+ <div id="hint_id_email" class="help-block">Insert your email</div>
+@@ -29,13 +29,13 @@
+ </div>
+ <div id="div_id_first_name" class="form-group has-error"> <label for="id_first_name"
+ class="control-label requiredField"> first name<span class="asteriskField">*</span> </label>
+- <div class="controls "> <input type="text" name="first_name" maxlength="5" aria-invalid="true"
++ <div class="controls "> <input type="text" name="first_name" maxlength="5" aria-describedby="id_first_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_first_name"> <span
+ id="error_1_id_first_name" class="help-block"><strong>This field is required.</strong></span> </div>
+ </div>
+ <div id="div_id_last_name" class="form-group has-error"> <label for="id_last_name"
+ class="control-label requiredField"> last name<span class="asteriskField">*</span> </label>
+- <div class="controls "> <input type="text" name="last_name" maxlength="5" aria-invalid="true"
++ <div class="controls "> <input type="text" name="last_name" maxlength="5" aria-describedby="id_last_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_last_name"> <span
+ id="error_1_id_last_name" class="help-block"><strong>This field is required.</strong></span> </div>
+ </div>
+@@ -46,4 +46,4 @@
+ id="id_datetime_field_1"> <span id="error_1_id_datetime_field" class="help-block"><strong>This field is
+ required.</strong></span> </div>
+ </div>
+-</form>
+\ No newline at end of file
++</form>
+--- a/tests/results/bootstrap3/test_form_helper/test_form_show_errors_non_field_errors_false_gte52.html 2026-05-12 09:07:54.198762179 +0200
++++ b/tests/results/bootstrap3/test_form_helper/test_form_show_errors_non_field_errors_false_gte52.html 2026-05-12 09:10:38.733931881 +0200
+@@ -6,7 +6,7 @@
+ <div id="div_id_email" class="form-group"> <label for="id_email" class="control-label requiredField"> email<span
+ class="asteriskField">*</span> </label>
+ <div class="controls "> <input type="text" name="email" maxlength="30"
+- aria-describedby="id_email_helptext" aria-invalid="true"
++ aria-describedby="id_email_helptext id_email_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_email">
+ <div id="hint_id_email" class="help-block">Insert your email</div>
+ </div>
+@@ -23,12 +23,12 @@
+ </div>
+ <div id="div_id_first_name" class="form-group"> <label for="id_first_name" class="control-label requiredField">
+ first name<span class="asteriskField">*</span> </label>
+- <div class="controls "> <input type="text" name="first_name" maxlength="5" aria-invalid="true"
++ <div class="controls "> <input type="text" name="first_name" maxlength="5" aria-describedby="id_first_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_first_name"> </div>
+ </div>
+ <div id="div_id_last_name" class="form-group"> <label for="id_last_name" class="control-label requiredField"> last
+ name<span class="asteriskField">*</span> </label>
+- <div class="controls "> <input type="text" name="last_name" maxlength="5" aria-invalid="true"
++ <div class="controls "> <input type="text" name="last_name" maxlength="5" aria-describedby="id_last_name_error" aria-invalid="true"
+ class="textinput textInput inputtext form-control" required id="id_last_name"> </div>
+ </div>
+ <div id="div_id_datetime_field" class="form-group">
+@@ -37,4 +37,4 @@
+ id="id_datetime_field_0"><input type="text" name="datetime_field_1" class="timeinput" required aria-invalid="true"
+ id="id_datetime_field_1"> </div>
+ </div>
+-</form>
+\ No newline at end of file
++</form>
diff --git a/dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52Py.patch b/dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52Py.patch
new file mode 100644
index 000000000000..26104c0d6b68
--- /dev/null
+++ b/dev-python/crispy-bootstrap3/files/crispy-bootstrap3-2024.1-django52Py.patch
@@ -0,0 +1,53 @@
+--- a/tests/test_form_helper.py 2026-05-12 09:33:29.599682337 +0200
++++ b/tests/test_form_helper.py 2026-05-12 09:36:56.323382756 +0200
+@@ -139,6 +139,11 @@
+ "bootstrap3/test_form_helper/"
+ "test_form_show_errors_non_field_errors_true_lte40.html"
+ )
++ elif django.VERSION >= (5, 2):
++ expected = parse_expected(
++ "bootstrap3/test_form_helper/"
++ "test_form_show_errors_non_field_errors_true_gte52.html"
++ )
+ elif django.VERSION >= (5, 0):
+ # Added 'aria-describedby' for fields with help_text
+ # https://docs.djangoproject.com/en/5.0/releases/5.0/#forms
+@@ -162,6 +167,11 @@
+ "bootstrap3/test_form_helper/"
+ "test_form_show_errors_non_field_errors_false_lte40.html"
+ )
++ elif django.VERSION >= (5, 2):
++ expected = parse_expected(
++ "bootstrap3/test_form_helper/"
++ "test_form_show_errors_non_field_errors_false_gte52.html"
++ )
+ elif django.VERSION >= (5, 0):
+ # Added 'aria-describedby' for fields with help_text
+ # https://docs.djangoproject.com/en/5.0/releases/5.0/#forms
+@@ -542,7 +552,11 @@
+ form.is_valid()
+
+ form.helper.form_show_errors = True
+- if django.VERSION >= (5, 0):
++ if django.VERSION >= (5, 2):
++ expected = parse_expected(
++ "bootstrap3/test_form_helper/bootstrap_form_show_errors_bs3_true_gte52.html"
++ )
++ elif django.VERSION >= (5, 0):
+ # Added 'aria-describedby' for fields with help_text
+ # https://docs.djangoproject.com/en/5.0/releases/5.0/#forms
+ expected = parse_expected(
+@@ -555,7 +569,12 @@
+ assert parse_form(form) == expected
+
+ form.helper.form_show_errors = False
+- if django.VERSION >= (5, 0):
++ if django.VERSION >= (5, 2):
++ expected = parse_expected(
++ "bootstrap3/test_form_helper/"
++ "bootstrap_form_show_errors_bs3_false_gte52.html"
++ )
++ elif django.VERSION >= (5, 0):
+ # Added 'aria-describedby' for fields with help_text
+ # https://docs.djangoproject.com/en/5.0/releases/5.0/#forms
+ expected = parse_expected(
diff --git a/dev-python/crispy-bootstrap3/metadata.xml b/dev-python/crispy-bootstrap3/metadata.xml
new file mode 100644
index 000000000000..31493193c995
--- /dev/null
+++ b/dev-python/crispy-bootstrap3/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>