summaryrefslogtreecommitdiff
path: root/dev-python/django
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-04 10:08:01 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-04 10:08:01 +0100
commitfea4a05eed382195ccf0fd9536eb165d60bd2c5f (patch)
treede105e1f21d546f9e80a66860e80aef27065140d /dev-python/django
parent2475ac51234b6ca2597db80dd05deb29667888b0 (diff)
gentoo auto-resync : 04:07:2023 - 10:08:01
Diffstat (limited to 'dev-python/django')
-rw-r--r--dev-python/django/Manifest10
-rw-r--r--dev-python/django/django-3.2.20.ebuild109
-rw-r--r--dev-python/django/django-4.1.10.ebuild97
-rw-r--r--dev-python/django/django-4.2.3.ebuild97
-rw-r--r--dev-python/django/files/django-3.2.20-urlsplit.patch111
5 files changed, 424 insertions, 0 deletions
diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest
index 91d2ed1a38b2..562a243d1ed2 100644
--- a/dev-python/django/Manifest
+++ b/dev-python/django/Manifest
@@ -1,16 +1,26 @@
AUX django-3.1-bashcomp.patch 2085 BLAKE2B 36a0aa4d3413f13089ac104f5d3f98ecbb152a9a5a35f8c1ff2e5ffc9824153b0ac89f1cbca76c31a1afefde471e4d6ed801e405551b25cb31da89c20f3019cc SHA512 82dceede4292bad6e3e4966a6dba01bd2bbc7db494fce592e25dc4a64236485d88d8ad67b247239a80f8fe96dff054d20afea6f48a5518b67cf88404d399e61c
AUX django-3.2.19-py311.patch 7776 BLAKE2B 387f602318cbf9cdc7edfb2c63a2fe05d3559c3773defae5a5aaf30aef5fe46aadd5c764273d4b7af59132a57caf28cc0463c70eac680105103ba824009eba16 SHA512 5d94f45e92d8ac020aeda1c682e9c5cc60f4c82920dcdf46ef777e76c880e6ca81ec70daabd09cde4ce769fbbc13ac63d1a3763d7eeeeff53102bc31890166ca
+AUX django-3.2.20-urlsplit.patch 4567 BLAKE2B fc167eeba60856cde358a37239eda0cc77c856bed76597505d934c71a88f838e4c001adb2593abdc98a8e4f0bfd90e1e9ea86b3a25fc8bc1d9cf8f556b046afd SHA512 0f26a0118897f2cdcdbbbaf02b1fe9c2e2ad7b680f15e19cff2b69a242a0108975d1b9029f78a49db75090ee292c12d14f2b0618fd91aacc97cd18cf5190e86c
AUX django-4.0-bashcomp.patch 2021 BLAKE2B f04c83b500a92ea8ef9609225191e38a41b3349a295beca8f8575ab05395d0cf37e1aefe295004b11c1bcf34cce9074ac7d274034cb50e1ae43e2fcb5d6952b2 SHA512 2215dca4120023b0fd839738bd602443c49e9adaa98d182bc74081ebe70613649c2dc11e2b5f6242701dceac25755adb8605774895091360b56ed1195a7e629e
DIST Django-3.2.19.checksum.txt 2558 BLAKE2B dafc8f9b47686b96aca4e3c48fd7bac91ce26f5439439f5799cdbfd892120797cdf99dcf99ede62bc825f4e2475691b6235c9fd077da1cc3b2a946933798f207 SHA512 4d1596e83a064b02abf0c00ec7f9f134be1cb9a77e61016b5a3370b5c286ebb667c1a29b678a403b98f6d8b5488dd16c50297db7026d46e913d2793996aa1171
DIST Django-3.2.19.tar.gz 9832772 BLAKE2B 3b18fe5edf258b71111bbd34d55c5006d4f399155841549e02d4e256a2710bd1c22408d6cb1edea041aaf3239c709d4c51695e5a42a5440339714f0e6c3d4824 SHA512 25a611b4479718b866b9f7b9247d6ada1f20c9118d17735f07fe3ae2e7092bee3655c1733c5c244b2e7f5ab04f6d5cc7fab94ca33d2426e281581554a64582dc
+DIST Django-3.2.20.checksum.txt 2559 BLAKE2B db638871c5fd57d05000fd4765a8a0d1b2cc198ec7879fbcd76a11021b0cecd334cea50f27cd0215143fb735429e7aba6638f9783a632009054226b2acd2080c SHA512 dc82a2ead2cd9167a0d0309475d57e0a63b0f35bb2dae4f0a2240c3ab2f3425a748eb7cc66cca678904b1907192457fb3fbc867119329d3daf1fd4230f9a615e
+DIST Django-3.2.20.tar.gz 9831078 BLAKE2B 3591081804dd08188f41ce0b2013b4d7a9adc992b8136ad76ff7a9c49436e6d26e659136e3463c40b380f441448aba8ead4de3e3c7726ec6908830719bef8dcd SHA512 32555552e3929718c998ecb7ca2f39b94bbce378cd3c2b633d497fdf58e435fc7a0a89e22bdfdfcb8e5e6884d909103c0f4b545ee0c01fe58a0ba9dd6eed992b
+DIST Django-4.1.10.checksum.txt 2559 BLAKE2B 103d1de6ec0da3a2440ea339388e2525ef5770f896be2383cf1828315e2c04ff8f5f8efe4d705dfcb905d453c25b8660410d4ab1b9d61331bc150a16ad857a28 SHA512 f23599dd06889a49c4fbb0c8c7b8f39ebaecbcb02c88ef95cdf33ea0c6563f3cf5c924d8b9a8b81e7b5aa17b6a1469b95e422faa7a53eb759bff516e053f302c
+DIST Django-4.1.10.tar.gz 10513572 BLAKE2B 0f1ef14fcf40cb6952fc459855a4e633e2d21c252a4732b27f8e980af6277ef69869a65a7bd0508fd7cdbd82742cb838170d965219b2919679ac92abfef087b6 SHA512 f31ad6fcce3bea0e0f895ec14b063485edec70872aa9c317243a38fb49b6c863159afc5aa31fb5c7a824c737f520f25cfbef55781c23fa0a204b61cefc66fb01
DIST Django-4.1.9.checksum.txt 2548 BLAKE2B 13f0594922dce5c2f680b2c2c03955c1772161204f96ec48744b56d8388c35790fec9c1dcd6b91dc2585a07137e05b1952e3f2a8524112d5a2de4cd1590a247b SHA512 d80687c1986cdec1facb040f35380b34618b493abbedbaea9326814e64a200118c6ed74d7a1c48c794de8d30de7a87381ffc4df6024153a0380f840fa5caaf7d
DIST Django-4.1.9.tar.gz 10514944 BLAKE2B d54350ee09f1460156d98d597075a63a5a64bc1198805eadffd337b1af8423332f874fca2327f4aa18aa3dd3ad362b687b14ceb2ca1b7d55b910b8a2030c182c SHA512 75f6f25e84b48f066b7e7e2ee47eb5af60a63d206d83aa32f366ec5685b202a97537daaf98afbbc1c3214f6df7b88630f0d2849f4c78827e2de1141c9bd0b317
DIST Django-4.2.1.checksum.txt 2548 BLAKE2B 4d20462ad292d01544a60f9fac13a52204763555ce317ddde161613edd58641b0ba2e8313e5683de9cdf555b2d11d5d2942da4142844572ad928f1e49488be94 SHA512 aeb69a20e331416749712fc2738e9bf9798a7333f45d680149aaad65b88bcc5a76f6f8692eff43a9a74c33137ac4a135fd59f00f8400e20377025d4b7e3acd02
DIST Django-4.2.1.tar.gz 10420051 BLAKE2B 7d657155f45bea0bfce964e74222edd742b2f4db1d23b91baac1021aebceef5d8e553767e1da32507832047e8d62e525783ddeed31f86f80ad7ea9a4962b5c6c SHA512 eaa3f633f380e9a215e52bd40c2f7c7aed9f0a6122f5c9c07d954904dcb8ccc9ae8ed2e988742e2b1b3b32e626cf754ab4e0d2b4ed06f3b81ef7a38f0bd047ee
DIST Django-4.2.2.checksum.txt 2569 BLAKE2B ff89a4ea9ed88ebe1c2a0ea2d8b9945986c550a53ad2ccb68754cb41e39766181c9605290c23c893083ee40e4544d486d7be86d5e096c4ea49837a367a22ff05 SHA512 226dbdda2e3b2898428ec90229ea043d3b568ebac6e6371cc56ef9b5d401fd9b73ef97788760cac44450d9b579743f9471228638a43a14ece7a25fc02dea4aee
DIST Django-4.2.2.tar.gz 10390518 BLAKE2B f5fd69d814947aadf7654c8863826524f4fed2d0c086af47d8009ada4fc2f40f7e23550ee14e09003788eca09b0d45835dd98be11bda5b8970e54a4fc2a01815 SHA512 68b88f79a784c0bcb80338e9c3497443716d02dfaebab1d8d87974393bd12d4d322cd61a05297e776966497a736962835c0ca73defc663fb13342a5d74863a5b
+DIST Django-4.2.3.checksum.txt 2549 BLAKE2B 8cd57d91bc05c4ae7c5fad7682668cb132c587cff63871173a7f3e9f9adada203544b93e017f743b7c7916ec97b4d7bb7bac06d1c875410a8836c49ea1627774 SHA512 d8e9c3f90fccfddb6b0284fc37d22e67476e49f58f80151e70d2640ed311e9657ab8aa60eebd509751b24c2f4102f33d496460a335f1adbba4ee0082d2d5c2fe
+DIST Django-4.2.3.tar.gz 10419003 BLAKE2B 393cf4d01865a6ff84de5d18860bedea6a28c8df9e1a3769026b308215e9373bf2c8d86e75914d76e2d104b5c1411aff0757682e0129b1dbef29a5dd3836bbc6 SHA512 33c84a3fe16f8188a2c8090177d6bfd235004271ee1cee9c840e33dd22f60e0d54276c0dbc4127faaba82ae7d6a219a07c5638b19c701c3f36db238d2aae33f0
EBUILD django-3.2.19.ebuild 2954 BLAKE2B e37bc4d50bc4ccd5d2c525485de6f563400c7661b752345af01eda9a8fb2491d1c9d1903d64d3f660f42bc2e312474b4475a26a9b76417caaa9e73e071db8513 SHA512 f1d35ec16520ca15cf3b0ac809f2078665035cdf0111d5730debfae8c893fb415b1669a8fc6ba8bfdf58c912a239f36cd52ca12aa0ea82fea925ce2772f94539
+EBUILD django-3.2.20.ebuild 3029 BLAKE2B 9189884296629c423132e1a86461aefea3e46c760579c2730ae12ff1fa1dac449c8dc68f62b1bdb303101e121ec2248e6327cf167ec9eeb8c71b27a6d6bddd5f SHA512 aba9ac53b203d989fdc080914f1ef60581d238519119ab38208e203b4e3b05a21e93f16d15c1e780d9eb5f9040bba6a00f467dfa9ff44943245c96180c7db9fb
+EBUILD django-4.1.10.ebuild 2652 BLAKE2B bc57e449bfb519e496a02cc8735813de2877e21ff2ae68f739208a5c97e87a453f7b9c711f5ae6548a3a021a3e3fe57e55df16d6bf2b8545e16e8cc118d3d64a SHA512 9b67663317e18a7cb497c35c6882f8a4917dd1af30ba94cc0abbad309296cf495aef9b5818df1b29f514da12692d8bef82075885ba8b717b2574069b5271cb84
EBUILD django-4.1.9.ebuild 2648 BLAKE2B 6f8dd38c7c971d2a491b823aacdff02484827e70be698f415ad3472bced34ea2d74ee934a17f13f43e7362888275bf8aec750231d6f75c6740745a1c0afe849f SHA512 d57119bd84757b49b8bff391e85f9d0bdfae6e9e3d83dd12e560d0a92ab59e1608a0f08700d7e7e30c936d68433f58052723c171b543823e9eb09e1e2d43fa95
EBUILD django-4.2.1.ebuild 2647 BLAKE2B 6ffc3ebf7ae9470f8b995c53edbd8341c1082124ac09f92ffcc92a96099b709273c78fef6a5635ac929d0e5d4dff183324e2318307b45fda70baeedc9035f990 SHA512 2722a2a44256e9d243eb62162886a614729fa5c6807bb53471910ceb71d0a61a99ef4008614a1a029e41ca21f144673019c52adbc41e6e22485a8e49a2003c25
EBUILD django-4.2.2.ebuild 2652 BLAKE2B dba17f470d703c878a3694d668036288a5b57e716297081a788862814defc5ea57e9e5ecbe0b94020913cdc7afed6da106a9d0048498e292c4094734ac9f02ca SHA512 373690924d88596f32c0681316b506d26faed93d1e6c08d46d386fce7a6134f001b72099df94df26ad6ffb4b5f6c003bd3f8863afdbc3eb9d1e3a6e96b3c4dee
+EBUILD django-4.2.3.ebuild 2652 BLAKE2B dba17f470d703c878a3694d668036288a5b57e716297081a788862814defc5ea57e9e5ecbe0b94020913cdc7afed6da106a9d0048498e292c4094734ac9f02ca SHA512 373690924d88596f32c0681316b506d26faed93d1e6c08d46d386fce7a6134f001b72099df94df26ad6ffb4b5f6c003bd3f8863afdbc3eb9d1e3a6e96b3c4dee
MISC metadata.xml 400 BLAKE2B 6b3414ac734f078d90c82b44edd2f9f70e494e98da8a3d874d18006ae5e0eb5f7060b98b402094d6045e800bf525586f2566e6f554a8b2999cce37bdcc5472a0 SHA512 1cf0bb6ef93da3abbd1a66878462b1b8672a9b8fccd7f968b427e429caa6ecf30cb703a6060d621ccad1ba77b927d2b0e632b04b0a47975918ccbfcc5f2b85f7
diff --git a/dev-python/django/django-3.2.20.ebuild b/dev-python/django/django-3.2.20.ebuild
new file mode 100644
index 000000000000..ca46ed4c7d3b
--- /dev/null
+++ b/dev-python/django/django-3.2.20.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='sqlite?,threads(+)'
+
+inherit bash-completion-r1 distutils-r1 optfeature verify-sig
+
+DESCRIPTION="High-level Python web framework"
+HOMEPAGE="
+ https://www.djangoproject.com/
+ https://github.com/django/django/
+ https://pypi.org/project/Django/
+"
+SRC_URI="
+ https://media.djangoproject.com/releases/$(ver_cut 1-2)/${P^}.tar.gz
+ verify-sig? ( https://media.djangoproject.com/pgp/${P^}.checksum.txt )
+"
+S="${WORKDIR}/${P^}"
+
+LICENSE="BSD"
+# admin fonts: Roboto (media-fonts/roboto)
+LICENSE+=" Apache-2.0"
+# admin icons, jquery, xregexp.js
+LICENSE+=" MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
+IUSE="doc sqlite test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/asgiref-3.3.4[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ >=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ $(python_gen_impl_dep sqlite)
+ ${RDEPEND}
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[webp,${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/selenium[${PYTHON_USEDEP}]
+ dev-python/tblib[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ )
+ verify-sig? ( >=sec-keys/openpgp-keys-django-20201201 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1-bashcomp.patch
+ "${FILESDIR}"/django-3.2.19-py311.patch
+ # needed for Python 3.11
+ "${FILESDIR}"/django-3.2.20-urlsplit.patch
+)
+
+distutils_enable_sphinx docs --no-autodoc
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/django.asc
+
+src_unpack() {
+ if use verify-sig; then
+ cd "${DISTDIR}" || die
+ verify-sig_verify_signed_checksums \
+ "${P^}.checksum.txt" sha256 "${P^}.tar.gz"
+ cd "${WORKDIR}" || die
+ fi
+
+ default
+}
+
+python_prepare_all() {
+ # Fails because of warnings
+ sed -i 's/test_dumpdata_proxy_with_concrete/_&/' tests/fixtures/tests.py || die
+ # TODO: this suddenly started failing
+ sed -i -e 's:test_custom_fields:_&:' tests/inspectdb/tests.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # Tests have non-standard assumptions about PYTHONPATH,
+ # and don't work with ${BUILD_DIR}/lib.
+ PYTHONPATH=. "${EPYTHON}" tests/runtests.py --settings=test_sqlite -v2 ||
+ die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ newbashcomp extras/django_bash_completion ${PN}-admin
+ bashcomp_alias ${PN}-admin django-admin.py
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature_header "Additional Backend support can be enabled via:"
+ optfeature "MySQL backend support" dev-python/mysqlclient
+ optfeature "PostgreSQL backend support" dev-python/psycopg:2
+ optfeature_header
+ optfeature "GEO Django" "sci-libs/gdal[geos]"
+ optfeature "Memcached support" dev-python/pylibmc dev-python/python-memcached
+ optfeature "ImageField Support" dev-python/pillow
+ optfeature "Password encryption" dev-python/bcrypt
+}
diff --git a/dev-python/django/django-4.1.10.ebuild b/dev-python/django/django-4.1.10.ebuild
new file mode 100644
index 000000000000..627b1753e2a1
--- /dev/null
+++ b/dev-python/django/django-4.1.10.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='sqlite?,threads(+)'
+
+inherit bash-completion-r1 distutils-r1 optfeature verify-sig
+
+DESCRIPTION="High-level Python web framework"
+HOMEPAGE="
+ https://www.djangoproject.com/
+ https://github.com/django/django/
+ https://pypi.org/project/Django/
+"
+SRC_URI="
+ https://media.djangoproject.com/releases/$(ver_cut 1-2)/${P^}.tar.gz
+ verify-sig? ( https://media.djangoproject.com/pgp/${P^}.checksum.txt )
+"
+S="${WORKDIR}/${P^}"
+
+LICENSE="BSD"
+# admin fonts: Roboto (media-fonts/roboto)
+LICENSE+=" Apache-2.0"
+# admin icons, jquery, xregexp.js
+LICENSE+=" MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
+IUSE="doc sqlite test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ <dev-python/asgiref-4[${PYTHON_USEDEP}]
+ >=dev-python/asgiref-3.5.2[${PYTHON_USEDEP}]
+ >=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ $(python_gen_impl_dep sqlite)
+ ${RDEPEND}
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[webp,${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/selenium[${PYTHON_USEDEP}]
+ dev-python/tblib[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ )
+ verify-sig? ( >=sec-keys/openpgp-keys-django-20201201 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0-bashcomp.patch
+)
+
+distutils_enable_sphinx docs --no-autodoc
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/django.asc
+
+src_unpack() {
+ if use verify-sig; then
+ cd "${DISTDIR}" || die
+ verify-sig_verify_signed_checksums \
+ "${P^}.checksum.txt" sha256 "${P^}.tar.gz"
+ cd "${WORKDIR}" || die
+ fi
+
+ default
+}
+
+python_test() {
+ # Tests have non-standard assumptions about PYTHONPATH,
+ # and don't work with ${BUILD_DIR}/lib.
+ PYTHONPATH=. "${EPYTHON}" tests/runtests.py --settings=test_sqlite -v2 ||
+ die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ newbashcomp extras/django_bash_completion ${PN}-admin
+ bashcomp_alias ${PN}-admin django-admin.py
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature_header "Additional Backend support can be enabled via:"
+ optfeature "MySQL backend support" dev-python/mysqlclient
+ optfeature "PostgreSQL backend support" dev-python/psycopg:2
+ optfeature_header
+ optfeature "GEO Django" "sci-libs/gdal[geos]"
+ optfeature "Memcached support" dev-python/pylibmc dev-python/python-memcached
+ optfeature "ImageField Support" dev-python/pillow
+ optfeature "Password encryption" dev-python/bcrypt
+}
diff --git a/dev-python/django/django-4.2.3.ebuild b/dev-python/django/django-4.2.3.ebuild
new file mode 100644
index 000000000000..e93ec1cd4c77
--- /dev/null
+++ b/dev-python/django/django-4.2.3.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='sqlite?,threads(+)'
+
+inherit bash-completion-r1 distutils-r1 optfeature verify-sig
+
+DESCRIPTION="High-level Python web framework"
+HOMEPAGE="
+ https://www.djangoproject.com/
+ https://github.com/django/django/
+ https://pypi.org/project/Django/
+"
+SRC_URI="
+ https://media.djangoproject.com/releases/$(ver_cut 1-2)/${P^}.tar.gz
+ verify-sig? ( https://media.djangoproject.com/pgp/${P^}.checksum.txt )
+"
+S="${WORKDIR}/${P^}"
+
+LICENSE="BSD"
+# admin fonts: Roboto (media-fonts/roboto)
+LICENSE+=" Apache-2.0"
+# admin icons, jquery, xregexp.js
+LICENSE+=" MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos"
+IUSE="doc sqlite test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ <dev-python/asgiref-4[${PYTHON_USEDEP}]
+ >=dev-python/asgiref-3.6.0[${PYTHON_USEDEP}]
+ >=dev-python/sqlparse-0.3.1[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ $(python_gen_impl_dep sqlite)
+ ${RDEPEND}
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pillow[webp,${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/selenium[${PYTHON_USEDEP}]
+ dev-python/tblib[${PYTHON_USEDEP}]
+ sys-devel/gettext
+ )
+ verify-sig? ( >=sec-keys/openpgp-keys-django-20230606 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0-bashcomp.patch
+)
+
+distutils_enable_sphinx docs --no-autodoc
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/django.asc
+
+src_unpack() {
+ if use verify-sig; then
+ cd "${DISTDIR}" || die
+ verify-sig_verify_signed_checksums \
+ "${P^}.checksum.txt" sha256 "${P^}.tar.gz"
+ cd "${WORKDIR}" || die
+ fi
+
+ default
+}
+
+python_test() {
+ # Tests have non-standard assumptions about PYTHONPATH,
+ # and don't work with ${BUILD_DIR}/lib.
+ PYTHONPATH=. "${EPYTHON}" tests/runtests.py --settings=test_sqlite -v2 ||
+ die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ newbashcomp extras/django_bash_completion ${PN}-admin
+ bashcomp_alias ${PN}-admin django-admin.py
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature_header "Additional Backend support can be enabled via:"
+ optfeature "MySQL backend support" dev-python/mysqlclient
+ optfeature "PostgreSQL backend support" dev-python/psycopg:2
+ optfeature_header
+ optfeature "GEO Django" "sci-libs/gdal[geos]"
+ optfeature "Memcached support" dev-python/pylibmc dev-python/python-memcached
+ optfeature "ImageField Support" dev-python/pillow
+ optfeature "Password encryption" dev-python/bcrypt
+}
diff --git a/dev-python/django/files/django-3.2.20-urlsplit.patch b/dev-python/django/files/django-3.2.20-urlsplit.patch
new file mode 100644
index 000000000000..4883da38c0f5
--- /dev/null
+++ b/dev-python/django/files/django-3.2.20-urlsplit.patch
@@ -0,0 +1,111 @@
+From 74fee3f5cab1481dcb299b6eeaf82f862470bafa Mon Sep 17 00:00:00 2001
+From: mendespedro <windowsxpedro@gmail.com>
+Date: Wed, 15 Dec 2021 11:55:19 -0300
+Subject: [PATCH] Fixed #33367 -- Fixed URLValidator crash in some edge cases.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[backported to 3.2.x by Michał Górny]
+---
+ django/core/validators.py | 13 +++---
+ .../forms_tests/field_tests/test_urlfield.py | 40 +++++++++++++++----
+ 2 files changed, 40 insertions(+), 13 deletions(-)
+
+diff --git a/django/core/validators.py b/django/core/validators.py
+index b9b58dfa61..aad21f95ea 100644
+--- a/django/core/validators.py
++++ b/django/core/validators.py
+@@ -111,15 +111,16 @@ class URLValidator(RegexValidator):
+ raise ValidationError(self.message, code=self.code, params={'value': value})
+
+ # Then check full URL
++ try:
++ splitted_url = urlsplit(value)
++ except ValueError:
++ raise ValidationError(self.message, code=self.code, params={'value': value})
+ try:
+ super().__call__(value)
+ except ValidationError as e:
+ # Trivial case failed. Try for possible IDN domain
+ if value:
+- try:
+- scheme, netloc, path, query, fragment = urlsplit(value)
+- except ValueError: # for example, "Invalid IPv6 URL"
+- raise ValidationError(self.message, code=self.code, params={'value': value})
++ scheme, netloc, path, query, fragment = splitted_url
+ try:
+ netloc = punycode(netloc) # IDN -> ACE
+ except UnicodeError: # invalid domain part
+@@ -130,7 +131,7 @@ class URLValidator(RegexValidator):
+ raise
+ else:
+ # Now verify IPv6 in the netloc part
+- host_match = re.search(r'^\[(.+)\](?::\d{2,5})?$', urlsplit(value).netloc)
++ host_match = re.search(r'^\[(.+)\](?::\d{1,5})?$', splitted_url.netloc)
+ if host_match:
+ potential_ip = host_match[1]
+ try:
+@@ -142,7 +143,7 @@ class URLValidator(RegexValidator):
+ # section 3.1. It's defined to be 255 bytes or less, but this includes
+ # one byte for the length of the name and one byte for the trailing dot
+ # that's used to indicate absolute names in DNS.
+- if len(urlsplit(value).hostname) > 253:
++ if splitted_url.hostname is None or len(splitted_url.hostname) > 253:
+ raise ValidationError(self.message, code=self.code, params={'value': value})
+
+
+diff --git a/tests/forms_tests/field_tests/test_urlfield.py b/tests/forms_tests/field_tests/test_urlfield.py
+index 19e4351c6a..68b148e7b7 100644
+--- a/tests/forms_tests/field_tests/test_urlfield.py
++++ b/tests/forms_tests/field_tests/test_urlfield.py
+@@ -135,13 +135,39 @@ class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase):
+ def test_urlfield_10(self):
+ """URLField correctly validates IPv6 (#18779)."""
+ f = URLField()
+- urls = (
+- 'http://[12:34::3a53]/',
+- 'http://[a34:9238::]:8080/',
+- )
+- for url in urls:
+- with self.subTest(url=url):
+- self.assertEqual(url, f.clean(url))
++ tests = [
++ 'foo',
++ 'com.',
++ '.',
++ 'http://',
++ 'http://example',
++ 'http://example.',
++ 'http://.com',
++ 'http://invalid-.com',
++ 'http://-invalid.com',
++ 'http://inv-.alid-.com',
++ 'http://inv-.-alid.com',
++ '[a',
++ 'http://[a',
++ # Non-string.
++ 23,
++ # Hangs "forever" before fixing a catastrophic backtracking,
++ # see #11198.
++ 'http://%s' % ('X' * 60,),
++ # A second example, to make sure the problem is really addressed,
++ # even on domains that don't fail the domain label length check in
++ # the regex.
++ 'http://%s' % ("X" * 200,),
++ # urlsplit() raises ValueError.
++ '////]@N.AN',
++ # Empty hostname.
++ '#@A.bO',
++ ]
++ msg = "'Enter a valid URL.'"
++ for value in tests:
++ with self.subTest(value=value):
++ with self.assertRaisesMessage(ValidationError, msg):
++ f.clean(value)
+
+ def test_urlfield_not_string(self):
+ f = URLField(required=False)
+--
+2.41.0
+