summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-04 14:43:23 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-04 15:48:42 +0200
commit0320d55352e1771c9350851b5e9f59818e5ec8df (patch)
tree167408439b86adf93dcae109882d88c6cbafc1a7 /dev-python/django
parentdev-python/xlsxwriter: Bump to 1.3.1 (diff)
downloadgentoo-0320d55352e1771c9350851b5e9f59818e5ec8df.tar.gz
gentoo-0320d55352e1771c9350851b5e9f59818e5ec8df.tar.bz2
gentoo-0320d55352e1771c9350851b5e9f59818e5ec8df.zip
dev-python/django: Bump to 3.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/django')
-rw-r--r--dev-python/django/Manifest1
-rw-r--r--dev-python/django/django-3.1.ebuild79
-rw-r--r--dev-python/django/files/django-3.1-bashcomp.patch56
3 files changed, 136 insertions, 0 deletions
diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest
index bf0f16d5be84..22d114b9f615 100644
--- a/dev-python/django/Manifest
+++ b/dev-python/django/Manifest
@@ -4,3 +4,4 @@ DIST Django-2.2.15.tar.gz 9023679 BLAKE2B 9619d0ac45a8256a1e605f447b89df6266d67d
DIST Django-3.0.7.tar.gz 8947502 BLAKE2B c26752f41f04f23ea1db9863d0919c17ed27b75133e22cc342e453e40077f05f6458f8edd290bfdcf828a181e38d89a1b4faeaa9cb44176ff0f7d67910d6b9df SHA512 566a78c3686baaea2ea8f2db2c1762a78ec5e5ae44f0be43f49c83899c2a0a9d1b2297a05ce8f4bc6bc580c494dde66bb2be47a8269cce3e1b007fedd857e5d3
DIST Django-3.0.8.tar.gz 9080731 BLAKE2B b3276527c9c5eba18b380204c498ebd5724e5211640ead9e05284eb013f907ce6799125b29e2030bc37ecd5a1022e6eb3f193eca5e2c6520adef630d6d2114a9 SHA512 92d169fb37883355f1898fc13b54b6732ec14d71f77e4b91db30dd9bfb5df8b34c1c9566af6ddc37e00a9e3eadd38b6a51ff604a4da4285167f66b55215be301
DIST Django-3.0.9.tar.gz 9081099 BLAKE2B 502f9cf1fafff50d92c771e845319f5406722cdb8ca0570688bb96e7fbc765cee319325b0340b722afeb0a304316d30408ca92154623ad4934877cbdc8ee9259 SHA512 1244b9cff26b9e8d9a3d611e0a39981bd1a46d68fa734a58ba12fd51eeb023fb053605372d7b41b51027e4e609f1870d25f7e0584d0449ceeb8d877f674e49b4
+DIST Django-3.1.tar.gz 9382872 BLAKE2B 31f2a45cf31f87401ac1834be81cf207ca48f720bf6d6885b774fb51f42616be1346b8ab71d6c0b605d99bc7422f27b21665729b78e00c9cc0ba9cf3e4d788f3 SHA512 31f0821966f4ebc6b2a719b69f1137a32a7228414221e8938a66c9b940465c008761bd380ba9ea603e3693d38c233d6f23afe0cbe5647eb2478844ce2d0e7fd4
diff --git a/dev-python/django/django-3.1.ebuild b/dev-python/django/django-3.1.ebuild
new file mode 100644
index 000000000000..04d8f1897c18
--- /dev/null
+++ b/dev-python/django/django-3.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_REQ_USE='sqlite?,threads(+)'
+
+inherit bash-completion-r1 distutils-r1 eutils
+
+MY_PN="Django"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="High-level Python web framework"
+HOMEPAGE="https://www.djangoproject.com/ https://pypi.org/project/Django/"
+SRC_URI="https://www.djangoproject.com/m/releases/$(ver_cut 1-2)/${MY_P}.tar.gz"
+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 ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="doc sqlite test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/asgiref[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ >=dev-python/sqlparse-0.2.2[${PYTHON_USEDEP}]"
+BDEPEND="
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ 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}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1-bashcomp.patch
+)
+
+distutils_enable_sphinx docs --no-autodoc
+
+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() {
+ elog "Additional Backend support can be enabled via"
+ optfeature "MySQL backend support" dev-python/mysqlclient
+ optfeature "PostgreSQL backend support" dev-python/psycopg:2
+ echo ""
+ elog "Other features can be enhanced by"
+ 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-3.1-bashcomp.patch b/dev-python/django/files/django-3.1-bashcomp.patch
new file mode 100644
index 000000000000..1652842aaa38
--- /dev/null
+++ b/dev-python/django/files/django-3.1-bashcomp.patch
@@ -0,0 +1,56 @@
+From e0a8c0663debeb222bf78b97678f60929313b60a 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 fa77d59aff..dfeb439a2e 100755
+--- a/extras/django_bash_completion
++++ b/extras/django_bash_completion
+@@ -37,35 +37,4 @@ _django_completion()
+ DJANGO_AUTO_COMPLETE=1 $1 ) )
+ }
+ # When the django-admin.py deprecation ends, remove django-admin.py.
+-complete -F _django_completion -o default django-admin.py 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(\.py)?"; 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.py django-admin
+--
+2.28.0
+