summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild')
-rw-r--r--sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild33
1 files changed, 26 insertions, 7 deletions
diff --git a/sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild b/sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild
index 76d6d822dd89..914a41411a91 100644
--- a/sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild
+++ b/sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild
@@ -1,23 +1,42 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI="7"
-inherit git-r3
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit python-any-r1 git-r3
DESCRIPTION="Self-syncing tree-merging file system based on FUSE"
-
HOMEPAGE="https://github.com/rpodgorny/unionfs-fuse"
EGIT_REPO_URI="https://github.com/rpodgorny/unionfs-fuse.git"
LICENSE="BSD"
SLOT="0"
KEYWORDS=""
-IUSE=""
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-fs/fuse:0"
+DEPEND="${RDEPEND}
+ test? (
+ $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]')
+ )
+"
-DEPEND="sys-fs/fuse:0"
-RDEPEND="${DEPEND}"
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+python_check_deps() {
+ use test || return 0
+ has_version "dev-python/pytest[${PYTHON_USEDEP}]"
+}
src_install() {
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
}
+
+src_test() {
+ addwrite /dev/fuse
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+}