media-gfx/splash-themes-livedvd: Merge gentoo-functions use fix
[gentoo.git] / dev-python / django-auth-ldap / django-auth-ldap-1.2.6.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 # Although setup.py claims to support py3, python-ldap does not
7 PYTHON_COMPAT=( python2_7 pypy )
8
9 inherit distutils-r1
10
11 DESCRIPTION="Django LDAP authentication backend"
12 HOMEPAGE="https://pypi.python.org/pypi/django-auth-ldap https://bitbucket.org/psagers/django-auth-ldap/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 KEYWORDS="~amd64 ~x86"
16 IUSE="doc test"
17
18 LICENSE="BSD"
19 SLOT="0"
20
21 RDEPEND="dev-python/django[${PYTHON_USEDEP}]
22                 >=dev-python/python-ldap-2.0[${PYTHON_USEDEP}]"
23 DEPEND="app-arch/unzip
24         dev-python/setuptools[${PYTHON_USEDEP}]
25         test? ( ${RDEPEND}
26                 >=dev-python/mockldap-0.2[${PYTHON_USEDEP}] )
27         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
28
29 PATCHES=( "${FILESDIR}"/docs.patch )
30
31 python_compile_all() {
32         use doc && emake -C docs html
33 }
34
35 python_test() {
36         PYTHONPATH=. "${PYTHON}" test/manage.py test || die
37 }
38
39 python_install_all() {
40         use doc && local HTML_DOCS=( docs/build/html/. )
41         distutils-r1_python_install_all
42 }