x11-themes/gentoo10-backgrounds: Cleanup per bug #85210
[gentoo.git] / dev-python / pyxattr / pyxattr-0.5.3.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 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
7
8 inherit distutils-r1 eutils
9
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"
14
15 LICENSE="LGPL-2.1"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
18 IUSE="doc test"
19
20 RDEPEND="sys-apps/attr"
21 DEPEND="${RDEPEND}
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         doc? ( <dev-python/sphinx-1.3[${PYTHON_USEDEP}] )
24         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
25
26 python_prepare_all() {
27         sed -i -e 's:, "-Werror"::' setup.py || die
28
29         distutils-r1_python_prepare_all
30 }
31
32 python_compile_all() {
33         use doc && emake doc
34 }
35
36 src_test() {
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
40
41         einfo 'Please note that the tests fail if xattrs are not supported'
42         einfo 'by the filesystem used for /var/tmp.'
43         distutils-r1_src_test
44 }
45
46 python_test() {
47         nosetests || die "Tests fail with ${EPYTHON}"
48 }
49
50 python_install_all() {
51         use doc && local HTML_DOCS=( doc/html/. )
52         distutils-r1_python_install_all
53 }