1 |
commit: 1ac50c41899fc23bf770661caca378dcd6457a64 |
2 |
Author: Horea Christian <horea.christ <AT> yandex <DOT> com> |
3 |
AuthorDate: Thu Jan 17 21:21:13 2019 +0000 |
4 |
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com> |
5 |
CommitDate: Thu Jan 17 21:23:01 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=1ac50c41 |
7 |
|
8 |
sci-biology/samri: added prefix support |
9 |
|
10 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
11 |
Signed-off-by: Horea Christian <horea.christ <AT> yandex.com> |
12 |
|
13 |
sci-biology/samri/samri-9999.ebuild | 18 ++++++++++++++---- |
14 |
1 file changed, 14 insertions(+), 4 deletions(-) |
15 |
|
16 |
diff --git a/sci-biology/samri/samri-9999.ebuild b/sci-biology/samri/samri-9999.ebuild |
17 |
index 4f2c64bc7..8a6bc65ae 100644 |
18 |
--- a/sci-biology/samri/samri-9999.ebuild |
19 |
+++ b/sci-biology/samri/samri-9999.ebuild |
20 |
@@ -5,7 +5,7 @@ EAPI=7 |
21 |
|
22 |
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
23 |
|
24 |
-inherit distutils-r1 git-r3 |
25 |
+inherit distutils-r1 git-r3 prefix |
26 |
|
27 |
DESCRIPTION="Small Animal Magnetic Resonance Imaging" |
28 |
HOMEPAGE="https://github.com/IBT-FMI/SAMRI" |
29 |
@@ -50,14 +50,24 @@ RDEPEND=" |
30 |
|
31 |
REQUIRED_USE="test? ( atlases )" |
32 |
|
33 |
+src_prepare() { |
34 |
+ distutils-r1_src_prepare |
35 |
+ sed -i -e "s:/usr:@GENTOO_PORTAGE_EPREFIX@/usr:g" `grep -rlI \'/usr/ *` |
36 |
+ sed -i -e "s:/usr:@GENTOO_PORTAGE_EPREFIX@/usr:g" `grep -rlI \"/usr/ *` |
37 |
+ sed -i -e "s:/usr:@GENTOO_PORTAGE_EPREFIX@/usr:g" `grep -rlI /usr/ test_scripts.sh` |
38 |
+ eprefixify $(grep -rl GENTOO_PORTAGE_EPREFIX samri/* test_scripts.sh) |
39 |
+} |
40 |
+ |
41 |
python_test() { |
42 |
distutils_install_for_testing |
43 |
export MPLBACKEND="agg" |
44 |
export PATH=${TEST_DIR}/scripts:$PATH |
45 |
export PYTHONIOENCODING=utf-8 |
46 |
./test_scripts.sh || die "Test scripts failed." |
47 |
- sed -i -e \ |
48 |
- "/def test_bru2bids():/i@×××××××××××.skip('Removed in full test suite, as this is already tested in `test_scripts.sh`')" \ |
49 |
- samri/pipelines/tests/test_repos.py || die |
50 |
+ sed -i \ |
51 |
+ -e '1s/^/import pytest \n/' \ |
52 |
+ -e "/def test_bru2bids():/i@×××××××××××.skip('Skipped by Portage, as this was already tested in test_scripts.sh')" \ |
53 |
+ samri/pipelines/tests/test_reposit.py || die |
54 |
+ cd "${BUILD_DIR}" || die |
55 |
pytest -vv || die |
56 |
} |