1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
8 inherit distutils-r1 eutils
10 DESCRIPTION="Python interface to xattr"
11 HOMEPAGE="http://pyxattr.k1024.org/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
13 http://pyxattr.k1024.org/downloads/${P}.tar.gz"
17 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
20 RDEPEND="sys-apps/attr"
22 dev-python/setuptools[${PYTHON_USEDEP}]
23 doc? ( <dev-python/sphinx-1.3[${PYTHON_USEDEP}] )
24 test? ( dev-python/nose[${PYTHON_USEDEP}] )"
26 python_prepare_all() {
27 sed -i -e 's:, "-Werror"::' setup.py || die
29 distutils-r1_python_prepare_all
32 python_compile_all() {
37 # Perform the tests in /var/tmp; that location is more likely
38 # to have xattr support than /tmp which is often tmpfs.
39 export TESTDIR=/var/tmp
41 einfo 'Please note that the tests fail if xattrs are not supported'
42 einfo 'by the filesystem used for /var/tmp.'
47 nosetests || die "Tests fail with ${EPYTHON}"
50 python_install_all() {
51 use doc && local HTML_DOCS=( doc/html/. )
52 distutils-r1_python_install_all