mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 01:37:34 -08:00
dev-python/django: Bump to 4.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
2b9ad6463e
commit
9d03e546c0
@ -4,3 +4,5 @@ DIST Django-3.1.14.checksum.txt 2556 BLAKE2B bb17e596d076489ac00b6b3eb98ab294969
|
||||
DIST Django-3.1.14.tar.gz 9659386 BLAKE2B 5e9317e777e3879f2cea3eea98018884c073eed47c3da9aab09858bc0869f4f34f48d20860c32344446498879b6c9b5cb9d5ba12f0528b703436a2c37325d286 SHA512 5356f453e23a33092221137769a594608771c5832c0dc00453e571fee056438b5366eba720b1fefa33099356980ee56a9665fc6ed7c86f5412e45d6432940e64
|
||||
DIST Django-3.2.10.checksum.txt 2556 BLAKE2B cdc1b28f213e43b27b0534587b8475bd68979f3c179357a7978109fa85ee0a4bbd5d0bba4625e6850aca603f688483dbdcb102a7411e74394079d2b0c0ef767e SHA512 852f867a5a11f11f98710cf27fdba2774de537dbe1e5edc402214acb65a6e00bf05a7b4fe5eb663cc21aa6ee9da890d7c74172a17c1b084db89ada1ff1db3745
|
||||
DIST Django-3.2.10.tar.gz 9811341 BLAKE2B a2ed3dda0d88a884443cc07446921fcd9cc9f302b5f578910f2e4027f8d87b92717bb22a7bf73cdb44fb7ddf4c178349e31eee6b796a45727356cde24e41d318 SHA512 6b793a1e544ab988d909d9fc5152d9dbba864c4916bb1f703a07c72f1a945ba93ba53b2f8843b67a16d0e68a736c43faf2f3d8aaa0867de1668c3845c24da7da
|
||||
DIST Django-4.0.checksum.txt 2529 BLAKE2B 0488acaf4fe37c99e3bd2370d47c47db81ffcad961212a88e7d53349299fdb3cbdc4a10fea3729d6d2353405216b8073abe8fcb2596b845760f16f2539ba4417 SHA512 26ac6ce6118d60d7bd0f0ef4c24c590eef7a102f546c3163000ad392d8f64b1c24648b8a4110df81170d60e3528466ceae974d408a700cf238dfdb8f9386d1ce
|
||||
DIST Django-4.0.tar.gz 9980403 BLAKE2B fb3cdaa8beae6983930d1e2760d617f1a96e52d7f538269709b07cc31ef049511b0517c1538934cf9ede5e374cd466df05ebabe29f1f8fb8c4c3928e8a08a1fc SHA512 6fec0521ee7da209f3b0fb1487ef4e8ef16bf3bf4ea108efc7a2ee3a9d28c7c33e5e3b2bd92e231641b0be902b45d1fd8b712c48a33496ae2c865a3698b25e14
|
||||
|
||||
103
dev-python/django/django-4.0.ebuild
Normal file
103
dev-python/django/django-4.0.ebuild
Normal file
@ -0,0 +1,103 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
PYTHON_REQ_USE='sqlite?,threads(+)'
|
||||
|
||||
inherit bash-completion-r1 distutils-r1 optfeature verify-sig
|
||||
|
||||
MY_P=${P^}
|
||||
DESCRIPTION="High-level Python web framework"
|
||||
HOMEPAGE="https://www.djangoproject.com/ https://pypi.org/project/Django/"
|
||||
SRC_URI="
|
||||
https://media.djangoproject.com/releases/$(ver_cut 1-2)/${MY_P}.tar.gz
|
||||
verify-sig? ( https://media.djangoproject.com/pgp/${MY_P}.checksum.txt )"
|
||||
S="${WORKDIR}/${MY_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.4.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/backports-zoneinfo[${PYTHON_USEDEP}]
|
||||
' python3_8 pypy3)"
|
||||
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? ( >=app-crypt/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 \
|
||||
"${MY_P}.checksum.txt" sha256 "${MY_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
|
||||
|
||||
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
|
||||
optfeature "High-level abstractions for Django forms" dev-python/django-formtools
|
||||
}
|
||||
56
dev-python/django/files/django-4.0-bashcomp.patch
Normal file
56
dev-python/django/files/django-4.0-bashcomp.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 103a0f5559795f6517c24ab65d2305a8320acf8a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Wed, 6 May 2020 07:24:05 +0200
|
||||
Subject: [PATCH] Remove completions unsuitable for autoloading
|
||||
|
||||
The override of 'python*' completions, as well as the attempt
|
||||
to './manage.py' completion are not going to work with autoloader.
|
||||
Strip them.
|
||||
---
|
||||
extras/django_bash_completion | 33 +--------------------------------
|
||||
1 file changed, 1 insertion(+), 32 deletions(-)
|
||||
|
||||
diff --git a/extras/django_bash_completion b/extras/django_bash_completion
|
||||
index 6fb941bef6..2f761ceb83 100755
|
||||
--- a/extras/django_bash_completion
|
||||
+++ b/extras/django_bash_completion
|
||||
@@ -36,35 +36,4 @@ _django_completion()
|
||||
COMP_CWORD=$COMP_CWORD \
|
||||
DJANGO_AUTO_COMPLETE=1 $1 ) )
|
||||
}
|
||||
-complete -F _django_completion -o default manage.py django-admin
|
||||
-
|
||||
-_python_django_completion()
|
||||
-{
|
||||
- if [[ ${COMP_CWORD} -ge 2 ]]; then
|
||||
- local PYTHON_EXE=${COMP_WORDS[0]##*/}
|
||||
- if echo "$PYTHON_EXE" | grep -qE "python([3-9]\.[0-9])?"; then
|
||||
- local PYTHON_SCRIPT=${COMP_WORDS[1]##*/}
|
||||
- if echo "$PYTHON_SCRIPT" | grep -qE "manage\.py|django-admin"; then
|
||||
- COMPREPLY=( $( COMP_WORDS=( "${COMP_WORDS[*]:1}" )
|
||||
- COMP_CWORD=$(( COMP_CWORD-1 ))
|
||||
- DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} ) )
|
||||
- fi
|
||||
- fi
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
-# Support for multiple interpreters.
|
||||
-unset pythons
|
||||
-if command -v whereis &>/dev/null; then
|
||||
- python_interpreters=$(whereis python | cut -d " " -f 2-)
|
||||
- for python in $python_interpreters; do
|
||||
- [[ $python != *-config ]] && pythons="${pythons} ${python##*/}"
|
||||
- done
|
||||
- unset python_interpreters
|
||||
- pythons=$(echo "$pythons" | tr " " "\n" | sort -u | tr "\n" " ")
|
||||
-else
|
||||
- pythons=python
|
||||
-fi
|
||||
-
|
||||
-complete -F _python_django_completion -o default $pythons
|
||||
-unset pythons
|
||||
+complete -F _django_completion -o default django-admin
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user