diff options
author | Ian Delaney <idella4@gentoo.org> | 2014-05-03 01:58:14 +0000 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2014-05-03 01:58:14 +0000 |
commit | 2dad274841de06803de3f757a7a529c16c03f4b1 (patch) | |
tree | fcaf92650d77d529a6f9943beb0e5a76ed0183af /dev-python/django | |
parent | Version bump, bug 508954. Cleanup (diff) | |
download | historical-2dad274841de06803de3f757a7a529c16c03f4b1.tar.gz historical-2dad274841de06803de3f757a7a529c16c03f4b1.tar.bz2 historical-2dad274841de06803de3f757a7a529c16c03f4b1.zip |
bumps; clean up PYTHON_COMPAT from old implementations
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0xB8072B0D
Diffstat (limited to 'dev-python/django')
-rw-r--r-- | dev-python/django/ChangeLog | 10 | ||||
-rw-r--r-- | dev-python/django/Manifest | 16 | ||||
-rw-r--r-- | dev-python/django/django-1.4.11.ebuild | 4 | ||||
-rw-r--r-- | dev-python/django/django-1.4.12.ebuild | 87 | ||||
-rw-r--r-- | dev-python/django/django-1.5.7.ebuild | 83 | ||||
-rw-r--r-- | dev-python/django/django-1.6.4.ebuild | 93 |
6 files changed, 285 insertions, 8 deletions
diff --git a/dev-python/django/ChangeLog b/dev-python/django/ChangeLog index 5850d3bf291f..6b2f3e5dcb68 100644 --- a/dev-python/django/ChangeLog +++ b/dev-python/django/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-python/django # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.128 2014/05/02 11:49:29 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.129 2014/05/03 01:57:47 idella4 Exp $ + +*django-1.5.7 (03 May 2014) +*django-1.6.4 (03 May 2014) +*django-1.4.12 (03 May 2014) + + 03 May 2014; Ian Delaney <idella4@gentoo.org> +django-1.4.12.ebuild, + +django-1.5.7.ebuild, +django-1.6.4.ebuild, django-1.4.11.ebuild: + bumps; clean up PYTHON_COMPAT from old implementations 02 May 2014; Ian Delaney <idella4@gentoo.org> -django-1.5.4.ebuild, -django-1.6.1.ebuild: diff --git a/dev-python/django/Manifest b/dev-python/django/Manifest index 6be23f6cb0c9..8d677e1e2f75 100644 --- a/dev-python/django/Manifest +++ b/dev-python/django/Manifest @@ -7,18 +7,24 @@ AUX django-1.5-py3tests.patch 959 SHA256 62fbb00c8d919306b48c8fcc82c7fa5e8aa3858 AUX django-1.5.4-objects.patch 1467 SHA256 237d0ee4e9f2af1d98b0b230977a41d061cbdbefc153193bc1539c4ad82622ee SHA512 09bdaab452f692679a15d0fbadf3c044417aeda0ce65b30bd2994d86b33ae93c13eb159fdad373a031ab2e0563861e29d1f9935b52c33af34a6afd25461e904d WHIRLPOOL d8a18947bd826c28836ce5180a6f9de758722fcc45ba11ca6a887c65711e7fa23827dcab734b6bfe51c330dd05a2d67a5d82e6e2d85130cdb05fcb4ca0622f26 AUX django-1.6-objects.patch 729 SHA256 ea217c069a28b19063fcf216433cab48bd693fa51db0585881905532575a0875 SHA512 e7dc3cc8e50b4b0d546983dd79f1fa2bf7680d04d1e401267334ce72ee065e0fac2b00f9287ccafc3fabca29bca4c1d6475021b5da19d145a2d90fd491bb7ae7 WHIRLPOOL 00b4f579809206c78ce1648059c56a3af146c883c1b36f4febede15b4d3075a3686b30a6feac8d03c1df5e45994da5a2fdece6bdb71afb8d16bb72e139d67931 DIST Django-1.4.11.tar.gz 7752172 SHA256 4819d8b37405b33f4f0d156f60918094d566249f52137c5e6e0dbaa12995c201 SHA512 60cc3c769a9b21e93e6c4e79132ab8f4a48df1cb1c55faaa547c5fd28b9785ddca3b5393790bf96a4715d9b708c6da376ef4a28ec14849147d63f0fe40d386cb WHIRLPOOL 5db11c57bbfafafd9484b8674412b32cfb3531b11b5f51e7b73a313c24473b182b014ba2ab193373c1796bcefc38c85580dcda05f2aab32463db4af78afd232a +DIST Django-1.4.12.tar.gz 7752752 SHA256 2b9164dc3b26e077590c6ebb95996aab0e66fe3298113fafe960c4ff7fb53e25 SHA512 882e832d1f1b5c56195b7ca6a75c4351304f79c9b51dbbce61648325553606c0b64bd3b050cf221a283de9246a8713137a5e290c756b2544450bd3f7c82818d4 WHIRLPOOL e98eed8ce1d3716cd297a08bf7d52fe369cabe2b73bbd21e8db8fc7edbd09b4331cdab5ee9f190d2d72c4ce5bf9eb2cc4f5c4670a9b752ebf2b5dca714dd0502 DIST Django-1.5.6.tar.gz 8068359 SHA256 9b7fcb99d20289189ec0f1e06d1d2bed3b4772e3a393fddbfb006ea7c3f9bfaf SHA512 df266732742e4ff50d362aec870e9ca08213ede80894ddd297d1fee2141ba44b728e8acb4869cb3b50a06517fb04ae66d30e57deaf7e1426e886a5e094b41741 WHIRLPOOL 0f392d9ddf9ae0e3c503b7519e4f626931ba41f4d40f8def7df401e57c53c3c11ebf45ea334183d6c9d5cc400a9bf23cd514620ec1da46beab9c7b57d86f7e4c +DIST Django-1.5.7.tar.gz 8069177 SHA256 08a41c2a37451b8cc1136823b802dd6f17ad6ec0c8d2cadb4c9a219ff4c08593 SHA512 a7f4bfa7aa8f8e32dd20a7da8ae904061f756126847789c5d318c599158d22bbf23f5e1cbdfc59c60aaef23021335ce0698cbe1e5c6c6bf394fce6e905d53f88 WHIRLPOOL a6c8dc3a9addf9b0a1700a0b5eb0f78a0a5912d5b38f3bcd5f48f52c97c51bcf4e9308b8ca2e33665a178bffd536e5bf1a4674c21e682d5dc7c208690968c337 DIST Django-1.6.3.tar.gz 6628812 SHA256 6d9d3c468f9a09470d00e85fe492ba35edfc72cee7fb65ad0281010eba58b8f1 SHA512 3b5167df5aa1d2eacf5ff1d989e6304f8f86f71d69aa9aff93d4f1b3b8459d1bec0691cc49007c4e20e700f86849b95affd2dee212fd46a6a4732c2b540f568c WHIRLPOOL 1e740899757544fe64458be6815da538bb59a96f7cc8dbd60965cf1676b14586cb769db5f1db7b1e80d054ffae85825856f62265b4d1c0e49f6c1940adbea224 -EBUILD django-1.4.11.ebuild 2567 SHA256 7107e6435f530c645dafd88b214663e2cc06e2df3f798cd80bab1247aa267040 SHA512 74d24ecee37240a9fbc96db98c3cb4d5f036a076d3383bfc832a0c728caeb9c383d77cf7e22d2e4e50d54d40995542cc1c46aaecbcc30cda58fb6bce0a4e817c WHIRLPOOL f655b32e25155cef3d73a813a5f95de693092bcb69de1108b2e41c315ba38a14e2d653a0e8fa628425e5e21fb1d6c1454d3a2c5688d663a03eef96403797e6d0 +DIST Django-1.6.4.tar.gz 6630474 SHA256 ceee0beea79b1926c767aaa837e1b9e621e5f6b7d27138d90474b3917ca5527b SHA512 319e0ee8f71073b0132d3e06ffccca8580adeece0183dc064492ccd6d4f2d60e92fe89191b9d35ce44d5c391a02388b464821d2048a7fe87886d7556f0b95aa7 WHIRLPOOL 232a66bcaeb99ead521eca157ef9df83b866a6224cb4d162fd37dcff7cca71fd6cc0f318a9480fd7a8b15f35da4bed4ab7905460d701e8a766e362627f394b13 +EBUILD django-1.4.11.ebuild 2561 SHA256 522ae454973aa474dfae22f82d8334ef5f460ada5bb994068336c58d20ffbafb SHA512 a8de7f60eaa5362fc58af6b09fda508b662f2ed4c035cb4c965ad99acfb064c9c218f52aa3667e2cbbd697934e954ef9b8c896205f8ed8d8c16146f54d451b78 WHIRLPOOL bfdf7fbbda7ed06c086db9ba741a77f8a31b17ef790527ef911e442d1b4a1b19b099ba49deb2d4291f1e32ce3736e895e57bcf77d9ffe7ddd1f837671e94d239 +EBUILD django-1.4.12.ebuild 2563 SHA256 c261171e541fbefade7a2eabe42c8d38c30efa7d0feba125412daf7987d0d335 SHA512 f642cc8ababa8d963b3209d9248b3cc6f1bbbe7ebdbeea0948acf010182625859759d824138f01f12cbd2a853c9606d5df7b2d38c33d33938ac2fafc96fab0f4 WHIRLPOOL c6b516c1f4203fe7e38135b3ba4740b0f5aa9c001dc900807839849ac8fc99de2a295165a1886f23313dbfed429950e1fb37e0770f6c3a32aa3ba994e1ada81a EBUILD django-1.5.6.ebuild 2456 SHA256 6bc5017cd0fa4f6e0d4e6897d384ceadb1b3335dbee975183225d2e47ad9953c SHA512 104e7973ede62bd86022525d0c2fcbdf47e0fffaa23aa0303fae0a1f1d3408ebdd5328c1c94811331b385c5bc7ac3511a5f37559dde6be3c4d1967b5a093c5e6 WHIRLPOOL 4e62f03b4e851808bf74bb3d8d17affd928fe99061fc4156b353a355418c62d3678742f34d8714fd9d6be8317027d7caa2cfd618b7287911b493802759753ab3 +EBUILD django-1.5.7.ebuild 2452 SHA256 ba28fb3d43f0fd38452eb64aa35b1747386b8cc6f08af90b3e754f70c1875ed5 SHA512 2a0f78c622d5b0d08f5573e5dbbe5f19e98265216b6936d908642cdd8d2cd6dc0d4f505c596d6b2c81409b789a4d3b9a21aba9fbbac05cf9a3ca2b3423c97807 WHIRLPOOL 5f27dbe74da5fc76c38b64bf9936696c36be1628144f0f133b40426e0a54884ba505358c796310528535e8e3be0a1f72d85e8fc70759958a446ab440f1c8b5e9 EBUILD django-1.6.3.ebuild 2825 SHA256 75be77e0affe902d5f8b3fc334f3293252785626c41f5e678d1bdbdd8d9516a3 SHA512 3039521ce2b5cfff563186136d43f2a6d316fec6d1a7a5eacf6c55687dc045daedc18b12532767a8c0bf18368ff291521d4950cb142895ee2dcafdc43b49b219 WHIRLPOOL a082a3a58638525c7db7a5d196775b4d9826fd059c69132886c9de7b5ba7fdaaea73709ccd7fe26a0ab1cb5927625bc2644b1fd5cb2dd4f2098c2dd1f8aac6ac +EBUILD django-1.6.4.ebuild 2821 SHA256 d8435f9cd57d3d34099723b63c81cfd0b016238466e756fbfcc6bfa1e2e04f0e SHA512 fbda316b6c7c13f54b725abc83dbb6db78b7a04366fc41e5125cc20f57cdd36a81d810c126801f7ffdbd5748cad5ff51387e428baa8e079ca89cc875885b7839 WHIRLPOOL bfe4381f50c3a93e2e24d3d29c28e8bb594a71520940d148bd4a7594dcccc08733dfe786cd388fd78af381f7fb7ff476cb050a4f43de768b187199781097988b EBUILD django-9999.ebuild 2378 SHA256 7bab217e56b3cbafc16f45b32462afc0ad791658c123df2100e2336622332fcc SHA512 bc2a6a3217627133b74115c02f93eaf71b250f410f39f433baf86da74dd45bc7c8b191b10fa40ef299f1f9a98f0a12f223953c6050321f246052a2ce90cf588f WHIRLPOOL fecb6f73ff804f70c468ffa79d64f12aa5960c171f61be323bbf0a5cfde35c042752bf8e61c3af1b1a50ab64002c675120381f4412a3fb37d0861efa1d14dd43 -MISC ChangeLog 19686 SHA256 8fd18005646421059faca207ca476ccf81b26f2ec6fd994e21c6f0b9b31a7a49 SHA512 2b23c19b10b4295659498414bddab342b08ab162b72309de50a53fc8ed6af65496cc9c8a6be68e89ad3fe4b7689dc046bc5aeac6200da949e173e74302b43a21 WHIRLPOOL 71ab5244dfad6f9a9c6e5371ba497b81a496607b1244aeaaf0e3ea0dad6e8bb3b22aa924022f6640f9368c71c541f1893f448460c26157c517e5f448a3e7e242 +MISC ChangeLog 19969 SHA256 57b7b894b2106f733cb588280625bf6e130d492200601042cbf5aab49dbbbdde SHA512 ce28842711e8c8acd6a99674fcf97b55dc46c2bd1eaa89bb952f53b7a82bb1e8eb632425f59e8b2d870e3d6a273ecbc30e1aeae2d8b4880bdd362ec518c1a965 WHIRLPOOL 33b17205b99c04899f119424035e49396aaf14410905cf22efe938dc805a57e02fbf7d259fbb9af5c91cde589d87cea8559b488502f9e120207f3630964bd707 MISC metadata.xml 160 SHA256 6cd954a9de2307c57d32b25fa3599dee2908a4ddc6a98594f593d53577307a3a SHA512 7c02a1de1ddcb6b7c6378cceff0458da3a15d5381417f7cdf01874e7c372664b8899863f41b3a2fd8d6ad67ceb732dac6da0cc17575bf8e3e6d89480417c6628 WHIRLPOOL ed2795e4466eda8c804d5067c87386e269a59fe959393057ca5ddc36851e00f5210c4da1adf4bbdfdbb7d1d3d5c60aced25727ca12fdc8305d9e263a3aca9b13 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iEYEAREIAAYFAlNjhJMACgkQso7CE7gHKw2e4gCfZ/ib3+i0jG2lNEfkKUaeOqze -GNkAnjWFHdsYWjqeCZevIF6tsjDVS3HO -=dslQ +iEYEAREIAAYFAlNkS18ACgkQso7CE7gHKw3IXwCggY8t4COktbJ5zLITfW9DpOZt +w7UAniccJyNgGaILKhSKj6H7OHntrmmb +=bwr+ -----END PGP SIGNATURE----- diff --git a/dev-python/django/django-1.4.11.ebuild b/dev-python/django/django-1.4.11.ebuild index e9d8d3ccb1fd..fbf7e4c7afb3 100644 --- a/dev-python/django/django-1.4.11.ebuild +++ b/dev-python/django/django-1.4.11.ebuild @@ -1,10 +1,10 @@ # 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.4.11.ebuild,v 1.3 2014/04/27 09:09:03 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-1.4.11.ebuild,v 1.4 2014/05/03 01:57:47 idella4 Exp $ EAPI=5 -PYTHON_COMPAT=( python{2_5,2_6,2_7} ) +PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='sqlite?' inherit bash-completion-r1 distutils-r1 versionator webapp diff --git a/dev-python/django/django-1.4.12.ebuild b/dev-python/django/django-1.4.12.ebuild new file mode 100644 index 000000000000..7e6db301d1d8 --- /dev/null +++ b/dev-python/django/django-1.4.12.ebuild @@ -0,0 +1,87 @@ +# 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.4.12.ebuild,v 1.1 2014/05/03 01:57:47 idella4 Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE='sqlite?' + +inherit bash-completion-r1 distutils-r1 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 ~x86-macos" +IUSE="mysql postgres sqlite test" + +RDEPEND="virtual/python-imaging[${PYTHON_USEDEP}] + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) + mysql? ( >=dev-python/mysql-python-1.2.3[${PYTHON_USEDEP}] )" +DEPEND="${RDEPEND} + test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" + +S="${WORKDIR}/${MY_P}" + +WEBAPP_MANUAL_SLOT="yes" + +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 -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 +} + +python_install_all() { + distutils-r1_python_install_all + + newbashcomp extras/django_bash_completion ${PN} + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r django/contrib/admin/static/admin/. +} + +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.5.7.ebuild b/dev-python/django/django-1.5.7.ebuild new file mode 100644 index 000000000000..bd12637af0b1 --- /dev/null +++ b/dev-python/django/django-1.5.7.ebuild @@ -0,0 +1,83 @@ +# 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.5.7.ebuild,v 1.1 2014/05/03 01:57:47 idella4 Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_2,3_3} ) +PYTHON_REQ_USE='sqlite?' +WEBAPP_NO_AUTO_INSTALL="yes" + +inherit bash-completion-r1 distutils-r1 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 mysql postgres 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}] )" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) + test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" + +REQUIRED_USE="mysql? ( || ( $(python_gen_useflags 'python2*') ) )" + +S="${WORKDIR}/${MY_P}" + +WEBAPP_MANUAL_SLOT="yes" + +PATCHES=( "${FILESDIR}"/${PN}-1.5.4-objects.patch \ + "${FILESDIR}"/${PN}-1.5-py3tests.patch ) + +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. + # https://code.djangoproject.com/ticket/20514 + 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 +} + +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-1.6.4.ebuild b/dev-python/django/django-1.6.4.ebuild new file mode 100644 index 000000000000..deb9bd118165 --- /dev/null +++ b/dev-python/django/django-1.6.4.ebuild @@ -0,0 +1,93 @@ +# 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.6.4.ebuild,v 1.1 2014/05/03 01:57:47 idella4 Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYTHON_REQ_USE='sqlite?' +WEBAPP_NO_AUTO_INSTALL="yes" + +inherit bash-completion-r1 distutils-r1 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 mysql postgres 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}] )" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-1.0.7[${PYTHON_USEDEP}] ) + test? ( ${PYTHON_DEPS//sqlite?/sqlite} )" + +REQUIRED_USE="mysql? ( || ( $(python_gen_useflags 'python2*') ) )" + +S="${WORKDIR}/${MY_P}" + +WEBAPP_MANUAL_SLOT="yes" + +PATCHES=( "${FILESDIR}"/${PN}-1.5-py3tests.patch \ + "${FILESDIR}"/${PN}-1.6-objects.patch ) + +python_prepare_all() { + # Avoid test failures with unittest2 and Python 3. + sed -e "s/from unittest2 import \*/raise ImportError/" -i django/utils/unittest/__init__.py + 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. + # https://code.djangoproject.com/ticket/20514 + # https://code.djangoproject.com/ticket/21093 + # export PYTHONWARNINGS="d,i::ImportWarning" + sed -e 's:test_dont_base64_encode:_&:' -i tests/mail/tests.py || die + 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 +} + +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 +} |