dev-python/passlib: making things optional via use flags for bug 608686

Package-Manager: portage-2.3.3
This commit is contained in:
Matthew Thode
2017-02-11 09:38:02 -06:00
parent 45b640891a
commit 748cb1fd84
2 changed files with 38 additions and 0 deletions

View File

@@ -16,6 +16,11 @@
<longdescription lang="en">
comprehensive password hashing framework supporting over 20 schemes
</longdescription>
<use>
<flag name="bcrypt">bcrpyt hash algoryptm support</flag>
<flag name="totp">time based one time password support</flag>
<flag name="scrypt">accelerated scrypt algoythm support</flag>
</use>
<upstream>
<remote-id type="pypi">passlib</remote-id>
<remote-id type="bitbucket">ecollins/passlib</remote-id>

View File

@@ -0,0 +1,33 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
inherit distutils-r1
DESCRIPTION="Password hashing framework supporting over 20 schemes"
HOMEPAGE="https://bitbucket.org/ecollins/passlib/wiki/Home/"
SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"
LICENSE="BSD-2"
KEYWORDS="~amd64 ~arm64 ~x86"
SLOT="0"
IUSE="+bcrypt doc +scrypt test +totp"
RDEPEND="bcrypt? ( dev-python/bcrypt[${PYTHON_USEDEP}] )
totp? ( dev-python/cryptography[${PYTHON_USEDEP}] )
scrypt? ( dev-python/scrypt[${PYTHON_USEDEP}] )"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
python_test() {
nosetests -w "${BUILD_DIR}"/lib || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
use doc && dodoc docs/{*.rst,requirements.txt,lib/*.rst}
}