diff options
author | Sam James <sam@gentoo.org> | 2023-04-07 05:55:15 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-04-07 06:04:05 +0100 |
commit | f41f442cd5d9c66b2117e177571360ef9b5f37fa (patch) | |
tree | 122322ff49c88b3d9072845015d8dd7d3ed5213f /dev-python/django | |
parent | app-containers/docker-compose: restrict tests (diff) | |
download | gentoo-f41f442cd5d9c66b2117e177571360ef9b5f37fa.tar.gz gentoo-f41f442cd5d9c66b2117e177571360ef9b5f37fa.tar.bz2 gentoo-f41f442cd5d9c66b2117e177571360ef9b5f37fa.zip |
dev-python/django: add 4.1.8
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/django')
-rw-r--r-- | dev-python/django/Manifest | 2 | ||||
-rw-r--r-- | dev-python/django/django-4.1.8.ebuild | 104 | ||||
-rw-r--r-- | dev-python/django/files/django-4.1.8-py311.patch | 16 |
3 files changed, 122 insertions, 0 deletions
diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest index 5a92f88a9263..6f1074c6a68f 100644 --- a/dev-python/django/Manifest +++ b/dev-python/django/Manifest @@ -4,5 +4,7 @@ DIST Django-4.0.10.checksum.txt 2563 BLAKE2B 1ec93751204e80d75f5f4f15086cfd9aabe DIST Django-4.0.10.tar.gz 10430363 BLAKE2B d36aefd5d00023e5c4e34dda2b283e9a82d9e3b82576ce00cef7d9b75837ffdbf56327ad21ccefb02b79e8db93f12cf850541f4cb1d01b3dd28bdea0c73cb9d6 SHA512 04d1b207af21067c22c120486ff57ea602b3436adf1871f691735825afb30c3ed62f1cbc98d92fa70e9a818bcf50db70d949ab0c460f48f6027b75df9eba56c7 DIST Django-4.1.7.checksum.txt 2554 BLAKE2B 5a82eca5edb5b5d90c629c6d42414725b32ed55fc137cfb3fc9c5bfd392dc0fcc3f6b99eea64a16a88002a521bf910464a6fe11d9079d68e056acded3432be38 SHA512 4244abf4e81aec1f8daa7815f57483963e94cf67571f0c2f6ab67507515c7f6f72f86412a17c8e1e73170e1ed7d3d4503c5adba36c66d0b8f015350c81348116 DIST Django-4.1.7.tar.gz 10520415 BLAKE2B 88b66fea737f6fb1661a6987b9d6cecb84d58d675655a0ea5bed60ee28252edd11d8025498b7bc854b9c0c4814148bdc3bcdf59014dd040b5c424c3cd1711e46 SHA512 e34b0b05209297164d6cb84e7edf4740a2d638496c3107c06c0e773db292e9b02e6abbd8c3da347addaf17d9c9a56ef4873eb9edc5f1164e3d13d7f3ef083844 +DIST Django-4.1.8.checksum.txt 2550 BLAKE2B 9a4b37655a75ed1e18fd4219b7480afbcc4bde7aaef0ca4865451714cc4bcd123fc7bd69bbbe70bdab375a64bc12b3b6410f24dca0eecdcbb3b2a4d4df2611ec SHA512 415a0c9173d9e96e5360e6bf27b33c699eb952654bde3a1cd8229ac1c5b5b5ac131d3c1b168fe945f525de63e08c2ad9097e1a9eeadcc2b76a96b999acb5feda +DIST Django-4.1.8.tar.gz 10511976 BLAKE2B f269fb4d0047913fd0842daa67839d736b0d1b141081590beb2ffa2d0c535f992dab3820a9c5784caf2bb1ba1a7237b395a87d059ef2e4600341afb17bdafee2 SHA512 73910394a83e84522a41e98958701fab85ca71ed426c3cac549d1bd5eb2740106da9d2e3fba1ad8defaa2c7130c24e278558dd93e84afe8a66aa81686755ebc9 DIST Django-4.2.checksum.txt 2530 BLAKE2B 06ebf87ce44d32fd2491d600cbf4a74b32426dadc0096fe3a34933ba55ddcfed082e85021c9c4e525122e6be8aa3ff6a2bb282fa24fb29a732ea744d4fa1dd1a SHA512 6078fe14d8b356477bd163eca67ca9038b24f78b706bdd8fc2c4ebdbda5024c5014b333a820910dbfb075ff944b78789f7c745eec3a2724898b7b2620f40a6dd DIST Django-4.2.tar.gz 10415665 BLAKE2B 05faa1476f9bbbea93f33c0f35914b0893006ebbdfac98e347f886db0a39b263046dc149cbf41eeee982ef46138b835379f8384b5f8eb7ef77e16d338307830e SHA512 22a61943eb99cae81a99d84795155d5fecf5e1ec5d76be145b86d5ae1d4fb6a71be8bb62e58b935dedc846c8fd3f1e6fe68cbcc7fa1603a3c4753e69d61b7af4 diff --git a/dev-python/django/django-4.1.8.ebuild b/dev-python/django/django-4.1.8.ebuild new file mode 100644 index 000000000000..0bde99238c4f --- /dev/null +++ b/dev-python/django/django-4.1.8.ebuild @@ -0,0 +1,104 @@ +# 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_{9..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}] + $(python_gen_cond_dep ' + dev-python/backports-zoneinfo[${PYTHON_USEDEP}] + ' 3.8) +" +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 + !!<dev-python/ipython-7.21.0-r1 + !!=dev-python/ipython-7.22.0-r0 + ) + verify-sig? ( >=sec-keys/openpgp-keys-django-20201201 ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.0-bashcomp.patch + "${FILESDIR}"/${PN}-4.1.8-py311.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 + optfeature "High-level abstractions for Django forms" dev-python/django-formtools +} diff --git a/dev-python/django/files/django-4.1.8-py311.patch b/dev-python/django/files/django-4.1.8-py311.patch new file mode 100644 index 000000000000..043b31a2c780 --- /dev/null +++ b/dev-python/django/files/django-4.1.8-py311.patch @@ -0,0 +1,16 @@ +https://code.djangoproject.com/ticket/34118#comment:11 +https://github.com/python/cpython/issues/102549 +https://github.com/django/django/commit/38e63c9e61152682f3ff982c85a73793ab6d3267 + +Skip the test for now until upstream adapt it to the fix backported to Python 3.11 too. +--- a/tests/model_enums/tests.py ++++ b/tests/model_enums/tests.py +@@ -310,7 +310,7 @@ class CustomChoicesTests(SimpleTestCase): + class Timezone(datetime.timezone, models.Choices): + pass + +- def test_uuid_unsupported(self): ++ def _test_uuid_unsupported(self): + msg = "UUID objects are immutable" + with self.assertRaisesMessage(TypeError, msg): + |