blob: 329020ca11734c2db548dec6359ca3bf8e20a0aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{7..9} )
inherit python-any-r1 toolchain-funcs
DESCRIPTION="Self-syncing tree-merging file system based on FUSE"
HOMEPAGE="https://github.com/rpodgorny/unionfs-fuse"
SRC_URI="https://github.com/rpodgorny/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~x86-linux"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="sys-fs/fuse:0"
DEPEND="${RDEPEND}
test? (
$(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
)
"
pkg_setup() {
use test && python-any-r1_pkg_setup
}
python_check_deps() {
use test || return 0
has_version "dev-python/pytest[${PYTHON_USEDEP}]"
}
src_compile() {
emake AR="$(tc-getAR)" CC="$(tc-getCC)"
}
src_install() {
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
}
src_test() {
[[ -e /dev/fuse ]] || return 0
addwrite /dev/fuse
pytest -vv || die "Tests fail with ${EPYTHON}"
}
|