summaryrefslogtreecommitdiff
path: root/dev-python/reflink
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/reflink
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/reflink')
-rw-r--r--dev-python/reflink/Manifest3
-rw-r--r--dev-python/reflink/files/0.2.1-correct-test-deps.patch17
-rw-r--r--dev-python/reflink/reflink-0.2.1-r1.ebuild47
-rw-r--r--dev-python/reflink/reflink-0.2.1.ebuild46
4 files changed, 48 insertions, 65 deletions
diff --git a/dev-python/reflink/Manifest b/dev-python/reflink/Manifest
index 75cb18ad6177..88e1d4ceb9b5 100644
--- a/dev-python/reflink/Manifest
+++ b/dev-python/reflink/Manifest
@@ -1,4 +1,3 @@
-AUX 0.2.1-correct-test-deps.patch 325 BLAKE2B 33600ee1ffe704b26ba310dcdf4bd75850a6c8805e184f0aa90194600cf1bc6bf3005978ad957dcf2b8f14ea5de31e35f902c6304974f644c755013e4c6451fe SHA512 bafdd031a205891dc171a0ec0f8f62085c15ab7909e405444e88c6fede2f8640bcacc3e9c7f5e99244320770fcbcbf9009fc9da06d838905f7a388f7af124894
DIST reflink-0.2.1.tar.gz 14638 BLAKE2B a6449ebb27619ead9ff8452df6c48f3617e5f06eb347fbbe14ab00b9a43c01de8e101466288ac6fb73602165d4d4e9315f941c2f28dffe245ed2c39a10a61cf1 SHA512 5995ed787bda93cb46d99a603110768087420edd72c01d5f3f7f08a3f8f63b4629b900a3c173dd7f3119a892ac19ab1a9c3000ddd83810b22a52dfb5fb892a28
-EBUILD reflink-0.2.1.ebuild 1002 BLAKE2B 79b11b0085cf23300391b46619b4de00e32cfd7ece60d0b651cc9b55f61038b65cdcdc8f45c32cfa6042512199821adc0e1e9662008ffc5d65fb782e171e580a SHA512 64c98430658d65dee82ac922a0560dc3a9879f141b8b06bb6bf0533cb7dbc9ddf5abb6c89f9ced3171780a2dc02ef311532a9f0a72b365f62e28af8d3f333a95
+EBUILD reflink-0.2.1-r1.ebuild 1135 BLAKE2B b0a416dae3472ece3ec62d6ccf9d7d14ceb0993da7184d7060908d8d74b2d0a3d376e7748b117cdd06559c5189d10ba9fd74efb2eb39c10478c2feef59bc07ca SHA512 aa43344df610744d164d6aabeb4f8a25654a6911daa02fd8bedf8d0542402c8c36e2f77caa5829b700c810e549be91ce95c07c33ebc17f9e04b2bf61dcb4798a
MISC metadata.xml 493 BLAKE2B d7e0d0236537a68ada8c267aa6a2d6803a4f88e82938a73a7bcd0cf9cb5567177745f5fc2c1d81e92f17501672a430439845be6c63b7853cdf927302259bbec5 SHA512 8a4c8db0dc28f8ee0d6bd855554e8cf1f7661f5625f37ee04483fa918ac78d238487f1246dca1c96f647ccb6e9a35bd22b171d659ff06cd616c369d01bfba221
diff --git a/dev-python/reflink/files/0.2.1-correct-test-deps.patch b/dev-python/reflink/files/0.2.1-correct-test-deps.patch
deleted file mode 100644
index 78b1ef8fd94e..000000000000
--- a/dev-python/reflink/files/0.2.1-correct-test-deps.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 234c92b..3ef3237 100644
---- a/setup.py
-+++ b/setup.py
-@@ -20,11 +20,11 @@ requirements = [
-
- setup_requirements = [
- 'cffi',
-- 'pytest-runner',
- ]
-
- test_requirements = [
- 'pytest',
-+ 'pytest-runner',
- ]
-
- if sys.platform not in ['linux', 'linux2', 'win32', 'darwin']:
diff --git a/dev-python/reflink/reflink-0.2.1-r1.ebuild b/dev-python/reflink/reflink-0.2.1-r1.ebuild
new file mode 100644
index 000000000000..ab5936518e0f
--- /dev/null
+++ b/dev-python/reflink/reflink-0.2.1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+DISTUTILS_IN_SOURCE_BUILD=1
+
+inherit distutils-r1
+
+DESCRIPTION="Python wrapper around the reflink system calls"
+HOMEPAGE="https://gitlab.com/rubdos/pyreflink"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64"
+
+RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}
+ test? ( sys-fs/btrfs-progs )
+"
+
+distutils_enable_sphinx docs
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -e 's|'\''pytest-runner'\'',\?||' -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local notestmsg="Tests need FEATURES='-usersandbox -userpriv -sandbox'"
+ if [[ ${EUID} != 0 ]]; then
+ ewarn "${notestmsg}"
+ elif
+ has sandbox ${FEATURES}; then
+ ewarn "${notestmsg}"
+ else
+ pushd "${BUILD_DIR}"/lib >/dev/null || die
+ # module import will fail with any other directory structure
+ cp -rv "${S}"/tests ./ || die
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+ popd >/dev/null || die
+ fi
+}
diff --git a/dev-python/reflink/reflink-0.2.1.ebuild b/dev-python/reflink/reflink-0.2.1.ebuild
deleted file mode 100644
index c3df5d3b75bc..000000000000
--- a/dev-python/reflink/reflink-0.2.1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2019-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1
-
-DESCRIPTION="Python wrapper around the reflink system calls"
-HOMEPAGE="https://gitlab.com/rubdos/pyreflink"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="doc test"
-
-BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
- test? (
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/pytest-runner[${PYTHON_USEDEP}]
- sys-fs/btrfs-progs
- )
-"
-RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}"
-
-# goes places, like writing to /dev or creating btrfs volumes
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PV}-correct-test-deps.patch" )
-
-python_compile_all() {
- use doc && emake -C docs html
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( docs/_build/html/. )
- distutils-r1_python_install_all
-}
-
-python_test() {
- esetup.py test
-}