summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-01-03 01:25:40 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-01-03 01:25:40 +0000
commitd12e6a12bfe7a0e88a609632bda792185c67f45a (patch)
tree84f32f90cf79c690e70a6f29f385b5e35931c2fe /dev-python/django
parentVersion bump (diff)
downloadhistorical-d12e6a12bfe7a0e88a609632bda792185c67f45a.tar.gz
historical-d12e6a12bfe7a0e88a609632bda792185c67f45a.tar.bz2
historical-d12e6a12bfe7a0e88a609632bda792185c67f45a.zip
Fix tests (bug #294575).
Package-Manager: portage-15156-svn/cvs/Linux x86_64
Diffstat (limited to 'dev-python/django')
-rw-r--r--dev-python/django/ChangeLog8
-rw-r--r--dev-python/django/Manifest5
-rw-r--r--dev-python/django/django-1.1.1.ebuild41
-rw-r--r--dev-python/django/files/django-1.1.1-fix_tests.patch25
4 files changed, 58 insertions, 21 deletions
diff --git a/dev-python/django/ChangeLog b/dev-python/django/ChangeLog
index bc9817c30827..3e05ca79e9a1 100644
--- a/dev-python/django/ChangeLog
+++ b/dev-python/django/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/django
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.39 2009/10/10 15:29:36 grobian Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.40 2010/01/03 01:25:39 arfrever Exp $
+
+ 03 Jan 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ django-1.1.1.ebuild, +files/django-1.1.1-fix_tests.patch:
+ Fix tests (bug #294575).
10 Oct 2009; Fabian Groffen <grobian@gentoo.org> django-1.1.1.ebuild:
Merge from Prefix
diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest
index a625c19b3783..f8fb10485756 100644
--- a/dev-python/django/Manifest
+++ b/dev-python/django/Manifest
@@ -1,7 +1,8 @@
+AUX django-1.1.1-fix_tests.patch 840 RMD160 4a5a121c37fe883209505312be39dc2a9143413e SHA1 ecb48a057b5c037ecff653ff11bf7c9cd0fb1ef6 SHA256 88f7d237b7e8ee14ea44704e4b51cd12e2a1b8355e1569a59065659093665cf6
DIST Django-1.0.4.tar.gz 5088869 RMD160 9f61455bc4cc0277ddfe4a957863d5995f8c23f3 SHA1 a8b9f33adb007146b8b57f22f0f38467f0d2693a SHA256 a9388a047814bbe356c43d3d2e3afff42b1f93190c86aa4ac72f828a5ef107eb
DIST Django-1.1.1.tar.gz 5614106 RMD160 bf42e548ff86fc587086eaffc53d9397e2a8c871 SHA1 441c54f0e90730bf4a55432b64519169b1e6ef20 SHA256 d65b18319496fc4923b37fdb736e5ba1a90a3a18e2d7eaac7f3ad30738d1f6e4
EBUILD django-1.0.4.ebuild 2667 RMD160 b48eb97109356a87e2a2b534edcdad7019966f3c SHA1 78bed277b708aa3e87e4073dfeb91ba930e3ee28 SHA256 f6b9c557713a803835114950f9bad9acf3a9d69c003fc8351b46d2fd2c8e7a5a
-EBUILD django-1.1.1.ebuild 2839 RMD160 c6f0153f5980fbd57ac6a8e6c5ef66fb3036b305 SHA1 ffa3e5ab4176620c8504be5352fc17c9acd88869 SHA256 19d101902cba6534d8c5e5120f8dee36c80d62dba8e947e7e64154b759519b7a
+EBUILD django-1.1.1.ebuild 3057 RMD160 616ecac983f1663ac21f117e4653c5bc6c41d9ca SHA1 676832866b75c286de0fedd9a94e7b1bc84c4ff4 SHA256 0abcfbe3fccd7caa408c8280e9a3bda18ea324347f595c127624e5f30b25965a
EBUILD django-9999.ebuild 2147 RMD160 3358d2759e7ebcdbe1c101577b744adbb2a954d6 SHA1 a2184989e17d608c2568b709d1007997280a737b SHA256 b5983acebeab1c000cd662d05650330ba60d56805971ea9a0e592ad3fd45ac59
-MISC ChangeLog 6274 RMD160 74f236eab014bcd63303041995fa0c9b25177fdb SHA1 485b8dad87a5d137f0185617fee0744774a2aa4e SHA256 c0bc33bde71d5cd6dc3e85e3faaface28cd6b9661fbe1874c3c6cd0d6eb6931c
+MISC ChangeLog 6436 RMD160 8b46232f63d3eb86ca32fec43e7032258606aeca SHA1 0cec6f6007d92e04513e157a0278892022f6f520 SHA256 67e27a891e26aea424becf001e70a957ca756f87730547997c1110369c2d8432
MISC metadata.xml 160 RMD160 e730f96ab97c5be577a6d6d05f04990374a0dffb SHA1 2aa5e6be9c265c0e7bceb78ee9fd20df5f818e36 SHA256 6cd954a9de2307c57d32b25fa3599dee2908a4ddc6a98594f593d53577307a3a
diff --git a/dev-python/django/django-1.1.1.ebuild b/dev-python/django/django-1.1.1.ebuild
index 78205290e5e8..07e5ba756c22 100644
--- a/dev-python/django/django-1.1.1.ebuild
+++ b/dev-python/django/django-1.1.1.ebuild
@@ -1,17 +1,18 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.1.1.ebuild,v 1.2 2009/10/10 15:29:36 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.1.1.ebuild,v 1.3 2010/01/03 01:25:39 arfrever Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
inherit bash-completion distutils multilib versionator webapp
-MY_P="${P/#d/D}"
+MY_PN="Django"
+MY_P="${MY_PN}-${PV}"
WEBAPP_MANUAL_SLOT="yes"
DESCRIPTION="High-level python web framework"
-HOMEPAGE="http://www.djangoproject.com/"
+HOMEPAGE="http://www.djangoproject.com/ http://pypi.python.org/pypi/Django"
SRC_URI="http://media.djangoproject.com/releases/${PV}/${MY_P}.tar.gz"
LICENSE="BSD"
@@ -32,8 +33,7 @@ DEPEND="${RDEPEND}
>=dev-lang/python-2.5[sqlite]
( dev-python/pysqlite:2 <dev-lang/python-2.5 )
) )"
-
-RESTRICT_PYTHON_ABIS="3*"
+RESTRICT_PYTHON_ABIS="3.*"
S="${WORKDIR}/${MY_P}"
@@ -41,10 +41,15 @@ PYTHON_MODNAME="django"
DOCS="docs/* AUTHORS"
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-fix_tests.patch"
+}
+
src_compile() {
distutils_src_compile
- if use doc ; then
+ if use doc; then
pushd docs > /dev/null
emake html || die "Generation of HTML documentation failed"
popd > /dev/null
@@ -59,36 +64,38 @@ DATABASE_NAME='test.db'
ROOT_URLCONF='tests/urls.py'
SITE_ID=1
__EOF__
- PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" tests/runtests.py --settings=settings -v1
+ # Tests have non-standard assumptions about PYTHONPATH and
+ # don't work with usual "build-${PYTHON_ABI}/lib".
+ PYTHONPATH="." "$(PYTHON)" tests/runtests.py --settings=settings -v1
}
python_execute_function testing
}
src_install() {
- [[ -z ${ED} ]] && local ED=${D}
- distutils_python_version
- site_pkgs="$(python_get_sitedir)"
- export PYTHONPATH="${PYTHONPATH}:${ED}/${site_pkgs}"
- dodir ${site_pkgs}
+ [[ -z "${ED}" ]] && local ED="${D}"
+
+ python_set_active_version 2
+ local sitedir="$(python_get_sitedir)"
+ export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}${ED}/${sitedir}"
+ dodir "${sitedir}"
distutils_src_install
dobashcompletion extras/django_bash_completion
- if use examples ; then
+ if use examples; then
insinto /usr/share/doc/${PF}
doins -r examples
fi
- if use doc ; then
+ if use doc; then
mv docs/_build/html/{_,.}sources
dohtml txt -r docs/_build/html/*
fi
insinto "${MY_HTDOCSDIR#${EPREFIX}}"
- doins -r "${ED}/${site_pkgs}"/django/contrib/admin/media/*
+ doins -r "${ED}/${sitedir}/django/contrib/admin/media/"* || die "doins failed"
- #webapp_postinst_txt en "${WORKDIR}"/postinstall-en.txt
webapp_src_install
}
diff --git a/dev-python/django/files/django-1.1.1-fix_tests.patch b/dev-python/django/files/django-1.1.1-fix_tests.patch
new file mode 100644
index 000000000000..cc3c1093fe32
--- /dev/null
+++ b/dev-python/django/files/django-1.1.1-fix_tests.patch
@@ -0,0 +1,25 @@
+http://code.djangoproject.com/changeset/11619
+http://code.djangoproject.com/changeset/11697
+
+--- django/template/defaultfilters.py
++++ django/template/defaultfilters.py
+@@ -162,7 +162,7 @@
+
+ try:
+ m = int(d) - d
+- except (OverflowError, InvalidOperation):
++ except (ValueError, OverflowError, InvalidOperation):
+ return input_val
+
+ if not m and p < 0:
+--- tests/regressiontests/views/tests/generic/date_based.py
++++ tests/regressiontests/views/tests/generic/date_based.py
+@@ -100,7 +100,7 @@
+
+ now = datetime.now()
+ prev_month = now.date().replace(day=1)
+- if prev_month.month == 11:
++ if prev_month.month == 1:
+ prev_month = prev_month.replace(year=prev_month.year-1, month=12)
+ else:
+ prev_month = prev_month.replace(month=prev_month.month-1)