commit: 56134fa69c0762e7d93d4198d255f7fe8dcde4d7 Author: Hans de Graaff <hans <AT> degraaff <DOT> org> AuthorDate: Fri Nov 20 06:30:02 2015 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Fri Nov 20 06:30:02 2015 +0000 URL: https://gitweb.gentoo.org/dev/graaff.git/commit/?id=56134fa6
dev-python/django: initial import of reviewboard version This is the django version as distributed by reviewboard. It includes backported security patches maintained by reviewboard. Package-Manager: portage-2.2.20.1 dev-python/django/Manifest | 1 + dev-python/django/django-1.6.11.1.ebuild | 109 +++++++++++++++++++++ dev-python/django/files/django-1.5-py3tests.patch | 22 +++++ dev-python/django/files/django-1.6-objects.patch | 18 ++++ .../django/files/django-1.6.10-bashcomp.patch | 35 +++++++ dev-python/django/metadata.xml | 5 + 6 files changed, 190 insertions(+) diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest new file mode 100644 index 0000000..ca674d5 --- /dev/null +++ b/dev-python/django/Manifest @@ -0,0 +1 @@ +DIST Django-1.6.11.1.tar.gz 6662117 SHA256 6f55bd6fcd67fbceb01db17f23304f8288d68d5d8ed68caf987e05b6f2813593 SHA512 ad91a57e79e1354f33d1879de6d719a312439bcbbbd7e4653a2439553d644c04fe5b23f1f6980403df2d41ce15970a5209815861941c58784c86a61d2c2e9838 WHIRLPOOL c330dfa07f9440cb478ca37d01f88175d75c1979d84c22661fdacb4be083811048c49494a4a2f5f1bbfd138a06f0a865aa54e8a6558a2f1e5f64c2b0129279bd diff --git a/dev-python/django/django-1.6.11.1.ebuild b/dev-python/django/django-1.6.11.1.ebuild new file mode 100644 index 0000000..1469148 --- /dev/null +++ b/dev-python/django/django-1.6.11.1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{3,4} pypy ) + +PYTHON_REQ_USE='sqlite?,threads(+)' +WEBAPP_NO_AUTO_INSTALL="yes" + +inherit bash-completion-r1 distutils-r1 eutils versionator webapp + +MY_P="Django-${PV}" + +DESCRIPTION="High-level Python web framework" +HOMEPAGE="http://www.djangoproject.com/ https://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="https://downloads.reviewboard.org/releases/Django/1.6/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="doc sqlite test" + +RDEPEND="" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( >=dev-python/sphinx-1.0.7[${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/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}"/${PN}-1.6.10-bashcomp.patch +) + +pkg_setup() { + webapp_pkg_setup +} + +python_prepare_all() { + # 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() { + 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 -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" dev-python/pylibmc dev-python/python-memcached + optfeature "ImageField Support" dev-python/pillow + echo "" + + ewarn "This an unofficial Django security release by the reviewboard team" +} + +python_install_all() { + newbashcomp extras/django_bash_completion ${PN}-admin + bashcomp_alias ${PN}-admin django-admin.py + + if use doc; then + 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() { + 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/files/django-1.5-py3tests.patch b/dev-python/django/files/django-1.5-py3tests.patch new file mode 100644 index 0000000..16b2cc2 --- /dev/null +++ b/dev-python/django/files/django-1.5-py3tests.patch @@ -0,0 +1,22 @@ +https://code.djangoproject.com/ticket/20514 +diff -ur Django-1.5.orig/django/contrib/gis/tests/test_measure.py Django-1.5/django/contrib/gis/tests/test_measure.py +--- django/contrib/gis/tests/test_measure.py 2013-02-27 03:04:14.000000000 +0800 ++++ django/contrib/gis/tests/test_measure.py 2013-05-28 04:40:18.983011224 +0800 +@@ -40,7 +40,7 @@ + "Testing access in different units" + d = D(m=100) + self.assertEqual(d.km, 0.1) +- self.assertAlmostEqual(d.ft, 328.084, 3) ++ self.assertAlmostEqual(d.ft, 328.084, places=3) + + def testAccessInvalid(self): + "Testing access in invalid units" +@@ -172,7 +172,7 @@ + "Testing access in different units" + a = A(sq_m=100) + self.assertEqual(a.sq_km, 0.0001) +- self.assertAlmostEqual(a.sq_ft, 1076.391, 3) ++ self.assertAlmostEqual(a.sq_ft, 1076.391, places=3) + + def testAccessInvaliA(self): + "Testing access in invalid units" diff --git a/dev-python/django/files/django-1.6-objects.patch b/dev-python/django/files/django-1.6-objects.patch new file mode 100644 index 0000000..597da6e --- /dev/null +++ b/dev-python/django/files/django-1.6-objects.patch @@ -0,0 +1,18 @@ +#Remove un-needed objects.inv files from d'loading during doc build +diff -ur Django-1.6.1.orig/docs/conf.py Django-1.6.1/docs/conf.py +--- docs/conf.py 2013-12-12 14:37:59.000000000 -0500 ++++ docs/conf.py 2014-01-16 20:57:36.253670094 -0500 +@@ -109,12 +109,6 @@ + + # Links to Python's docs should reference the most recent version of the 2.x + # branch, which is located at this URL. +-intersphinx_mapping = { +- 'python': ('http://docs.python.org/2.7', None), +- 'sphinx': ('http://sphinx.pocoo.org/', None), +- 'six': ('http://pythonhosted.org/six/', None), +- 'simplejson': ('http://simplejson.readthedocs.org/en/latest/', None), +-} + + # Python's docs don't change every week. + intersphinx_cache_limit = 90 # days + 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 0000000..7c6ceff --- /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/metadata.xml b/dev-python/django/metadata.xml new file mode 100644 index 0000000..f977299 --- /dev/null +++ b/dev-python/django/metadata.xml @@ -0,0 +1,5 @@ +<?xml version = '1.0' encoding = 'UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>gra...@gentoo.org</email></maintainer> +</pkgmetadata>