diff options
author | 2015-02-28 18:08:42 +0000 | |
---|---|---|
committer | 2015-02-28 18:08:42 +0000 | |
commit | 9d95c8b6df648181d8f6ad3b59cbf23f1bd05c3d (patch) | |
tree | a05c73b3c44fcf34d25a89705f0126a1e1f0205b /dev-python | |
parent | Require newer version of libcec #541058 by Christian Affolter. (diff) | |
download | gentoo-2-9d95c8b6df648181d8f6ad3b59cbf23f1bd05c3d.tar.gz gentoo-2-9d95c8b6df648181d8f6ad3b59cbf23f1bd05c3d.tar.bz2 gentoo-2-9d95c8b6df648181d8f6ad3b59cbf23f1bd05c3d.zip |
Version BUmp and drop old for CVE-2015-{0219,0220,0221,0222}, #536586; add correct dependencies for tests, Use optfeature instead of harddepened on imaging, #473228
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/django/ChangeLog | 14 | ||||
-rw-r--r-- | dev-python/django/django-1.4.19.ebuild | 105 | ||||
-rw-r--r-- | dev-python/django/django-1.6.10.ebuild (renamed from dev-python/django/django-1.7.4.ebuild) | 75 | ||||
-rw-r--r-- | dev-python/django/django-1.7.5.ebuild | 35 | ||||
-rw-r--r-- | dev-python/django/django-1.7.ebuild | 100 | ||||
-rw-r--r-- | dev-python/django/django-9999.ebuild | 94 | ||||
-rw-r--r-- | dev-python/django/files/django-1.4.19-bashcomp.patch | 37 | ||||
-rw-r--r-- | dev-python/django/files/django-1.4.19-test.patch | 14 | ||||
-rw-r--r-- | dev-python/django/files/django-1.6.10-bashcomp.patch | 35 | ||||
-rw-r--r-- | dev-python/django/files/django-1.6.10-test.patch | 81 |
10 files changed, 406 insertions, 184 deletions
diff --git a/dev-python/django/ChangeLog b/dev-python/django/ChangeLog index 5410929059ca..ef5d74c57402 100644 --- a/dev-python/django/ChangeLog +++ b/dev-python/django/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for dev-python/django # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.151 2015/02/28 12:59:28 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.152 2015/02/28 18:08:42 jlec Exp $ + +*django-1.4.19 (28 Feb 2015) +*django-1.6.10 (28 Feb 2015) + + 28 Feb 2015; Justin Lecher <jlec@gentoo.org> +django-1.4.19.ebuild, + +django-1.6.10.ebuild, +files/django-1.4.19-bashcomp.patch, + +files/django-1.4.19-test.patch, +files/django-1.6.10-bashcomp.patch, + +files/django-1.6.10-test.patch, -django-1.7.4.ebuild, -django-1.7.ebuild, + django-1.7.5.ebuild, django-9999.ebuild: + Version BUmp and drop old for CVE-2015-{0219,0220,0221,0222}, #536586; add + correct dependencies for tests, Use optfeature instead of harddepened on + imaging, #473228 *django-1.7.5 (28 Feb 2015) diff --git a/dev-python/django/django-1.4.19.ebuild b/dev-python/django/django-1.4.19.ebuild new file mode 100644 index 000000000000..158dcf781b8f --- /dev/null +++ b/dev-python/django/django-1.4.19.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.4.19.ebuild,v 1.1 2015/02/28 18:08:42 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE='sqlite?' + +inherit bash-completion-r1 distutils-r1 eutils versionator webapp + +MY_P="Django-${PV}" + +DESCRIPTION="High-level Python web framework" +HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django" +SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="sqlite test" + +RDEPEND="" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + ${PYTHON_DEPS//sqlite?/sqlite} + dev-python/docutils[${PYTHON_USEDEP}] + <dev-python/numpy-1.9[$(python_gen_usedep 'python*')] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + virtual/python-imaging[${PYTHON_USEDEP}] + )" + +# app-text/pytextile[${PYTHON_USEDEP}] +# dev-python/markdown[${PYTHON_USEDEP}] +# dev-python/selenium[${PYTHON_USEDEP}] +# dev-python/py-bcrypt[${PYTHON_USEDEP}] + +S="${WORKDIR}/${MY_P}" + +WEBAPP_MANUAL_SLOT="yes" + +PATCHES=( + "${FILESDIR}"/${P}-bashcomp.patch + "${FILESDIR}"/${P}-test.patch +) + +python_prepare_all() { + # Disable tests requiring network connection. + sed \ + -e "s/test_correct_url_value_passes/_&/" \ + -e "s/test_correct_url_with_redirect/_&/" \ + -i tests/modeltests/validation/tests.py || die + sed \ + -e "s/test_urlfield_3/_&/" \ + -e "s/test_urlfield_4/_&/" \ + -e "s/test_urlfield_10/_&/" \ + -i tests/regressiontests/forms/tests/fields.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=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ + || die "Tests fail with ${EPYTHON}" +} + +src_install() { + distutils-r1_src_install + webapp_src_install + + elog "Additional Backend support can be enabled via" + optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python + optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysql-connector-python + optfeature "PostgreSQL backend support" dev-python/psycopg:2 + optfeature "Memcached support" python-memcached + optfeature "ImageField Support" virtual/python-imaging + echo "" +} + +python_install_all() { + newbashcomp extras/django_bash_completion ${PN}-admin + bashcomp_alias ${PN}-admin django-admin.py + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r django/contrib/admin/static/admin/. + distutils-r1_python_install_all +} + +pkg_postinst() { + elog "A copy of the admin media is available to" + elog "webapp-config for installation in a webroot," + elog "as well as the traditional location in python's" + elog "site-packages dir for easy development" + elog + ewarn "If you build Django ${PV} without USE=\"vhosts\"" + + # XXX: call webapp_pkg_postinst? the old ebuild didn't do that... + ewarn "webapp-config will automatically install the" + ewarn "admin media into the localhost webroot." +} diff --git a/dev-python/django/django-1.7.4.ebuild b/dev-python/django/django-1.6.10.ebuild index 8bd963842edb..e8ea690e0e38 100644 --- a/dev-python/django/django-1.7.4.ebuild +++ b/dev-python/django/django-1.6.10.ebuild @@ -1,13 +1,15 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.4.ebuild,v 1.1 2015/02/06 03:41:28 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.6.10.ebuild,v 1.1 2015/02/28 18:08:42 jlec Exp $ EAPI=5 -PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) + +PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) +PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='sqlite?' WEBAPP_NO_AUTO_INSTALL="yes" -inherit bash-completion-r1 distutils-r1 readme.gentoo versionator webapp +inherit bash-completion-r1 distutils-r1 eutils versionator webapp MY_P="Django-${PV}" @@ -20,70 +22,75 @@ SLOT="0" KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="doc sqlite test" -RDEPEND="virtual/python-imaging[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="" DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) - test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" + test? ( + ${PYTHON_DEPS//sqlite?/sqlite} + dev-python/docutils[${PYTHON_USEDEP}] + <dev-python/numpy-1.9[$(python_gen_usedep 'python*')] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + )" + +# dev-python/bcrypt[${PYTHON_USEDEP}] +# dev-python/selenium[${PYTHON_USEDEP}] S="${WORKDIR}/${MY_P}" WEBAPP_MANUAL_SLOT="yes" +PATCHES=( + "${FILESDIR}"/${PN}-1.5-py3tests.patch + "${FILESDIR}"/${PN}-1.6-objects.patch + "${FILESDIR}"/${P}-bashcomp.patch + "${FILESDIR}"/${P}-test.patch +) + pkg_setup() { webapp_pkg_setup } python_prepare_all() { - # https://github.com/django/django/commit/d0c6016367c11d4d4cc42ace340f951f5b75738e - # Courtesy of Arfrever - sed -e "106a\\ with change_cwd(\"..\"):" \ - -e "107,117s/^/ /" \ - -i tests/test_runner/test_discover_runner.py - - # Prevent d'loading in the doc build - sed -e '/^ "sphinx.ext.intersphinx",/d' -i docs/conf.py || die + # Disable tests requiring network connection. + sed \ + -e "s:test_sensitive_cookie_not_cached:_&:g" \ + -i tests/cache/tests.py || die distutils-r1_python_prepare_all } - python_compile_all() { - if use doc; then - emake -C docs html - fi + use doc && emake -C docs html } python_test() { # Tests have non-standard assumptions about PYTHONPATH, # and don't work with ${BUILD_DIR}/lib. - PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \ + PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ || die "Tests fail with ${EPYTHON}" } -src_test() { - # Port conflict in django.test.testcases.LiveServerTestCase. - # Several other races with temp files. - DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test -} - src_install() { distutils-r1_src_install webapp_src_install - DOC_CONTENTS="Optional support for mysql as a backend to sql is available in the form of - dev-python/mysql-python for support of python 2.7 support, or dev-python/mysql-connector-python - for support of python 2.7, 3.3 & 3.4. Support of postgresql as a backend can be enabled via - emerging dev-python/psycopg:2 in cpythons 2.7 3.3 & 3.4 but not in pypy. - Just emerge the package to suit the needs." - - readme.gentoo_create_doc + elog "Additional Backend support can be enabled via" + optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python + optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysql-connector-python + optfeature "PostgreSQL backend support" dev-python/psycopg:2 + optfeature "Memcached support" python-memcached + optfeature "ImageField Support" virtual/python-imaging + echo "" } python_install_all() { - newbashcomp extras/django_bash_completion ${PN} + newbashcomp extras/django_bash_completion ${PN}-admin + bashcomp_alias ${PN}-admin django-admin.py if use doc; then - rm -fr docs/_build/html/_sources + rm -fr docs/_build/html/_sources || die local HTML_DOCS=( docs/_build/html/. ) fi diff --git a/dev-python/django/django-1.7.5.ebuild b/dev-python/django/django-1.7.5.ebuild index a32aacc520a9..287cf5220a3a 100644 --- a/dev-python/django/django-1.7.5.ebuild +++ b/dev-python/django/django-1.7.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.5.ebuild,v 1.1 2015/02/28 12:59:28 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.5.ebuild,v 1.2 2015/02/28 18:08:42 jlec Exp $ EAPI=5 @@ -21,13 +21,23 @@ SLOT="0" KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="doc sqlite test" -RDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - virtual/python-imaging[${PYTHON_USEDEP}] -" +RDEPEND="" DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) - test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" + test? ( + ${PYTHON_DEPS//sqlite?/sqlite} + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/numpy[$(python_gen_usedep 'python*')] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + )" + +# dev-python/python-sqlparse[${PYTHON_USEDEP}] +# dev-python/bcrypt[${PYTHON_USEDEP}] +# dev-python/selenium[${PYTHON_USEDEP}] +# sci-libs/gdal[geos,${PYTHON_USEDEP}] S="${WORKDIR}/${MY_P}" @@ -49,15 +59,13 @@ python_prepare_all() { } python_compile_all() { - if use doc; then - emake -C docs html - fi + use doc && emake -C docs html } python_test() { # Tests have non-standard assumptions about PYTHONPATH, # and don't work with ${BUILD_DIR}/lib. - PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \ + PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ || die "Tests fail with ${EPYTHON}" } @@ -67,8 +75,11 @@ src_install() { elog "Additional Backend support can be enabled via" optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python - optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysql-connector-python + optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysqlcient optfeature "PostgreSQL backend support" dev-python/psycopg:2 + optfeature "GEO Django" sci-libs/gdal[geos] + optfeature "Memcached support" dev-python/python-memcached + optfeature "ImageField Support" virtual/python-imaging echo "" } @@ -77,7 +88,7 @@ python_install_all() { bashcomp_alias ${PN}-admin django-admin.py if use doc; then - rm -fr docs/_build/html/_sources + rm -fr docs/_build/html/_sources || die local HTML_DOCS=( docs/_build/html/. ) fi diff --git a/dev-python/django/django-1.7.ebuild b/dev-python/django/django-1.7.ebuild deleted file mode 100644 index efc15d35ece2..000000000000 --- a/dev-python/django/django-1.7.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.7.ebuild,v 1.4 2014/12/22 03:44:07 idella4 Exp $ - -EAPI=5 -PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) -PYTHON_REQ_USE='sqlite?' -WEBAPP_NO_AUTO_INSTALL="yes" - -inherit bash-completion-r1 distutils-r1 readme.gentoo versionator webapp - -MY_P="Django-${PV}" - -DESCRIPTION="High-level Python web framework" -HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django" -SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="doc sqlite test" - -RDEPEND="virtual/python-imaging[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND} - doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) - test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" - -S="${WORKDIR}/${MY_P}" - -WEBAPP_MANUAL_SLOT="yes" - -pkg_setup() { - webapp_pkg_setup -} - -python_prepare_all() { - # https://github.com/django/django/commit/d0c6016367c11d4d4cc42ace340f951f5b75738e - # Courtesy of Arfrever - sed -e "106a\\ with change_cwd(\"..\"):" \ - -e "107,117s/^/ /" \ - -i tests/test_runner/test_discover_runner.py - - # Prevent d'loading in the doc build - sed -e '/^ "sphinx.ext.intersphinx",/d' -i docs/conf.py || die - - distutils-r1_python_prepare_all -} - -python_compile_all() { - if use doc; then - emake -C docs html - fi -} - -python_test() { - # Tests have non-standard assumptions about PYTHONPATH, - # and don't work with ${BUILD_DIR}/lib. - PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \ - || die "Tests fail with ${EPYTHON}" -} - -src_test() { - # Port conflict in django.test.testcases.LiveServerTestCase. - # Several other races with temp files. - DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test -} - -src_install() { - distutils-r1_src_install - webapp_src_install - - DOC_CONTENTS="Optional support for mysql as a backend to sql is available in the form of - dev-python/mysql-python for support of python 2.7 support, or dev-python/mysql-connector-python - for support of python 2.7, 3.3 & 3.4. Support of postgresql as a backend can be enabled via - emerging dev-python/psycopg:2 in cpythons 2.7 3.3 & 3.4 but not in pypy. - Just emerge the package to suit the needs." - - readme.gentoo_create_doc -} - -python_install_all() { - newbashcomp extras/django_bash_completion ${PN} - - if use doc; then - rm -fr docs/_build/html/_sources - local HTML_DOCS=( docs/_build/html/. ) - fi - - insinto "${MY_HTDOCSDIR#${EPREFIX}}" - doins -r django/contrib/admin/static/admin/. - distutils-r1_python_install_all -} - -pkg_postinst() { - elog "A copy of the admin media is available to webapp-config for installation in a" - elog "webroot, as well as the traditional location in python's site-packages dir" - elog "for easy development." - webapp_pkg_postinst -} diff --git a/dev-python/django/django-9999.ebuild b/dev-python/django/django-9999.ebuild index 144acbe2f042..de6c7f71f6c6 100644 --- a/dev-python/django/django-9999.ebuild +++ b/dev-python/django/django-9999.ebuild @@ -1,48 +1,65 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-9999.ebuild,v 1.23 2014/09/09 05:27:31 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-9999.ebuild,v 1.24 2015/02/28 18:08:42 jlec Exp $ EAPI=5 -PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) + +PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) PYTHON_REQ_USE='sqlite?' WEBAPP_NO_AUTO_INSTALL="yes" -#if LIVE -inherit git-2 -EGIT_REPO_URI="git://github.com/django/django.git - https://github.com/django/django.git" -#endif - -inherit bash-completion-r1 distutils-r1 versionator webapp - -MY_P="Django-${PV}" +inherit bash-completion-r1 distutils-r1 eutils git-r3 versionator webapp DESCRIPTION="High-level Python web framework" HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django" -SRC_URI="https://www.djangoproject.com/m/releases/$(get_version_component_range 1-2)/${MY_P}.tar.gz" +SRC_URI="" +EGIT_REPO_URI=" + git://github.com/django/django.git + https://github.com/django/django.git + " LICENSE="BSD" SLOT="0" -KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" -IUSE="doc mysql postgres sqlite test" +KEYWORDS="" +IUSE="doc sqlite test" -PY2_USEDEP=$(python_gen_usedep 'python2*') -RDEPEND="virtual/python-imaging[${PYTHON_USEDEP}] - postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) - mysql? ( >=dev-python/mysql-python-1.2.3[${PY2_USEDEP}] )" +RDEPEND="" DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) - test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" - -#if LIVE -SRC_URI= -KEYWORDS= -#endif + test? ( + ${PYTHON_DEPS//sqlite?/sqlite} + dev-python/bcrypt[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/numpy[$(python_gen_usedep 'python*')] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/python-sqlparse[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/selenium[${PYTHON_USEDEP}] + sci-libs/gdal[geos,${PYTHON_USEDEP}] + )" S="${WORKDIR}/${MY_P}" WEBAPP_MANUAL_SLOT="yes" +PATCHES=( + "${FILESDIR}"/${PN}-1.7.5-bashcomp.patch +) + +pkg_setup() { + webapp_pkg_setup +} + +python_prepare_all() { + # Prevent d'loading in the doc build + sed -e '/^ "sphinx.ext.intersphinx",/d' -i docs/conf.py || die + + distutils-r1_python_prepare_all +} + python_compile_all() { use doc && emake -C docs html } @@ -50,33 +67,36 @@ python_compile_all() { python_test() { # Tests have non-standard assumptions about PYTHONPATH, # and don't work with ${BUILD_DIR}/lib. - PYTHONPATH=. \ - "${PYTHON}" tests/runtests.py --settings=test_sqlite -v1 \ + PYTHONPATH=. "${PYTHON}" tests/runtests.py --settings=test_sqlite -v2 \ || die "Tests fail with ${EPYTHON}" } -src_test() { - # Port conflict in django.test.testcases.LiveServerTestCase. - # Several other races with temp files. - DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test -} - src_install() { distutils-r1_src_install webapp_src_install + + elog "Additional Backend support can be enabled via" + optfeature "MySQL backend support in python 2.7 only" dev-python/mysql-python + optfeature "MySQL backend support in python 2.7 - 3.4" dev-python/mysqlcient + optfeature "PostgreSQL backend support" dev-python/psycopg:2 + optfeature "GEO Django" sci-libs/gdal[geos] + optfeature "Memcached support" dev-python/python-memcached + optfeature "ImageField Support" virtual/python-imaging + echo "" } python_install_all() { - distutils-r1_python_install_all - newbashcomp extras/django_bash_completion ${PN} + newbashcomp extras/django_bash_completion ${PN}-admin + bashcomp_alias ${PN}-admin django-admin.py if use doc; then - rm -fr docs/_build/html/_sources - dohtml -A txt -r docs/_build/html/. + rm -fr docs/_build/html/_sources || die + local HTML_DOCS=( docs/_build/html/. ) fi insinto "${MY_HTDOCSDIR#${EPREFIX}}" doins -r django/contrib/admin/static/admin/. + distutils-r1_python_install_all } pkg_postinst() { diff --git a/dev-python/django/files/django-1.4.19-bashcomp.patch b/dev-python/django/files/django-1.4.19-bashcomp.patch new file mode 100644 index 000000000000..26d5f7ee1405 --- /dev/null +++ b/dev-python/django/files/django-1.4.19-bashcomp.patch @@ -0,0 +1,37 @@ + extras/django_bash_completion | 17 +---------------- + 1 file changed, 1 insertion(+), 16 deletions(-) + +diff --git a/extras/django_bash_completion b/extras/django_bash_completion +old mode 100755 +new mode 100644 +index 1c3887e..748227d +--- a/extras/django_bash_completion ++++ b/extras/django_bash_completion +@@ -37,7 +37,7 @@ _django_completion() + COMP_CWORD=$COMP_CWORD \ + DJANGO_AUTO_COMPLETE=1 $1 ) ) + } +-complete -F _django_completion -o default django-admin.py manage.py django-admin ++complete -F _django_completion -o default django-admin.py django-admin + + _python_django_completion() + { +@@ -55,18 +55,3 @@ _python_django_completion() + 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 +- pythons="${pythons} $(basename -- $python)" +- done +- pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ") +-else +- pythons=python +-fi +- +-complete -F _python_django_completion -o default $pythons +- diff --git a/dev-python/django/files/django-1.4.19-test.patch b/dev-python/django/files/django-1.4.19-test.patch new file mode 100644 index 000000000000..3fc4b09c3357 --- /dev/null +++ b/dev-python/django/files/django-1.4.19-test.patch @@ -0,0 +1,14 @@ + tests/regressiontests/utils/jslex.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/regressiontests/utils/jslex.py b/tests/regressiontests/utils/jslex.py +index 7cd93ca..24317ff 100644 +--- a/tests/regressiontests/utils/jslex.py ++++ b/tests/regressiontests/utils/jslex.py +@@ -1,5 +1,5 @@ ++# -*- coding: utf-8 -*- + """Tests for jslex.""" +-# encoding: utf-8 + # originally from https://bitbucket.org/ned/jslex + + from django.test import TestCase diff --git a/dev-python/django/files/django-1.6.10-bashcomp.patch b/dev-python/django/files/django-1.6.10-bashcomp.patch new file mode 100644 index 000000000000..7c6ceff076a4 --- /dev/null +++ b/dev-python/django/files/django-1.6.10-bashcomp.patch @@ -0,0 +1,35 @@ + extras/django_bash_completion | 17 +---------------- + 1 file changed, 1 insertion(+), 16 deletions(-) + +diff --git a/extras/django_bash_completion b/extras/django_bash_completion +index 8f85211..ab13755 100755 +--- a/extras/django_bash_completion ++++ b/extras/django_bash_completion +@@ -37,7 +37,7 @@ _django_completion() + COMP_CWORD=$COMP_CWORD \ + DJANGO_AUTO_COMPLETE=1 $1 ) ) + } +-complete -F _django_completion -o default django-admin.py manage.py django-admin ++complete -F _django_completion -o default django-admin.py django-admin + + _python_django_completion() + { +@@ -55,18 +55,3 @@ _python_django_completion() + 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 +- pythons="${pythons} ${python##*/}" +- done +- pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ") +-else +- pythons=python +-fi +- +-complete -F _python_django_completion -o default $pythons +- diff --git a/dev-python/django/files/django-1.6.10-test.patch b/dev-python/django/files/django-1.6.10-test.patch new file mode 100644 index 000000000000..abc39ffbca2b --- /dev/null +++ b/dev-python/django/files/django-1.6.10-test.patch @@ -0,0 +1,81 @@ + django/core/management/commands/makemessages.py | 4 ++-- + tests/i18n/commands/extraction.py | 14 +++++++++++--- + tests/utils_tests/test_jslex.py | 2 +- + 3 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py +index 5b09661..c8f05ac 100644 +--- a/django/core/management/commands/makemessages.py ++++ b/django/core/management/commands/makemessages.py +@@ -90,7 +90,7 @@ class TranslatableFile(object): + orig_file = os.path.join(self.dirpath, self.file) + is_templatized = file_ext in command.extensions + if is_templatized: +- with open(orig_file, "rU") as fp: ++ with open(orig_file, "r") as fp: + src_data = fp.read() + thefile = '%s.py' % self.file + content = templatize(src_data, orig_file[2:]) +@@ -404,7 +404,7 @@ class Command(NoArgsCommand): + for domain in domains: + django_po = os.path.join(django_dir, 'conf', 'locale', locale, 'LC_MESSAGES', '%s.po' % domain) + if os.path.exists(django_po): +- with io.open(django_po, 'rU', encoding='utf-8') as fp: ++ with io.open(django_po, 'r', encoding='utf-8') as fp: + m = plural_forms_re.search(fp.read()) + if m: + plural_form_line = force_str(m.group('value')) +diff --git a/tests/i18n/commands/extraction.py b/tests/i18n/commands/extraction.py +index e0b6deb..06cf50d 100644 +--- a/tests/i18n/commands/extraction.py ++++ b/tests/i18n/commands/extraction.py +@@ -5,6 +5,7 @@ import io + import os + import re + import shutil ++import sys + import warnings + + from django.core import management +@@ -141,6 +142,10 @@ class BasicExtractorTests(ExtractorTests): + self.assertIn("UnicodeDecodeError: skipped file not_utf8.txt in .", + force_text(stdout.getvalue())) + ++ # This issue is fixed in 1.8+ (#23312). ++ if six.PY3 and sys.platform.startswith('win'): ++ test_unicode_decode_error = expectedFailure(test_unicode_decode_error) ++ + def test_extraction_warning(self): + """test xgettext warning about multiple bare interpolation placeholders""" + os.chdir(self.test_dir) +@@ -206,13 +211,16 @@ class BasicExtractorTests(ExtractorTests): + self.assertEqual(len(ws), 3) + for w in ws: + self.assertTrue(issubclass(w.category, TranslatorCommentWarning)) +- six.assertRegex(self, str(ws[0].message), ++ six.assertRegex( ++ self, str(ws[0].message), + r"The translator-targeted comment 'Translators: ignored i18n comment #1' \(file templates[/\\]comments.thtml, line 4\) was ignored, because it wasn't the last item on the line\." + ) +- six.assertRegex(self, str(ws[1].message), ++ six.assertRegex( ++ self, str(ws[1].message), + r"The translator-targeted comment 'Translators: ignored i18n comment #3' \(file templates[/\\]comments.thtml, line 6\) was ignored, because it wasn't the last item on the line\." + ) +- six.assertRegex(self, str(ws[2].message), ++ six.assertRegex( ++ self, str(ws[2].message), + r"The translator-targeted comment 'Translators: ignored i18n comment #4' \(file templates[/\\]comments.thtml, line 8\) was ignored, because it wasn't the last item on the line\." + ) + # Now test .po file contents +diff --git a/tests/utils_tests/test_jslex.py b/tests/utils_tests/test_jslex.py +index a2af7b4..e696149 100644 +--- a/tests/utils_tests/test_jslex.py ++++ b/tests/utils_tests/test_jslex.py +@@ -1,5 +1,5 @@ ++# -*- coding: utf-8 -*- + """Tests for jslex.""" +-# encoding: utf-8 + # originally from https://bitbucket.org/ned/jslex + + from django.test import TestCase |