commit: 9a13af8737903d7bb70f8667fa53e6056fd3d429 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> AuthorDate: Wed Oct 20 13:12:14 2021 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Wed Oct 20 13:12:14 2021 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=9a13af87
sci-biology/tigmint: properly install python things Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> ...igmint-1.2.4.ebuild => tigmint-1.2.4-r1.ebuild} | 33 +++++++++++++++------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/sci-biology/tigmint/tigmint-1.2.4.ebuild b/sci-biology/tigmint/tigmint-1.2.4-r1.ebuild similarity index 57% rename from sci-biology/tigmint/tigmint-1.2.4.ebuild rename to sci-biology/tigmint/tigmint-1.2.4-r1.ebuild index 1b181ea44..6900ea7aa 100644 --- a/sci-biology/tigmint/tigmint-1.2.4.ebuild +++ b/sci-biology/tigmint/tigmint-1.2.4-r1.ebuild @@ -1,9 +1,10 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{8..9} ) +DISTUTILS_USE_SETUPTOOLS=no inherit distutils-r1 @@ -13,9 +14,10 @@ SRC_URI="https://github.com/bcgsc/tigmint/releases/download/v${PV}/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" -KEYWORDS="" +KEYWORDS="~amd64 ~x86" RESTRICT="test" +PROPERTIES="test_network" RDEPEND=" dev-python/intervaltree[${PYTHON_USEDEP}] @@ -29,10 +31,8 @@ RDEPEND=" distutils_enable_tests pytest -# install the executable into /usr/bin -# BUG: the read_fasta.py should be installed into python modules -# so it can be imported into python src_prepare(){ + # install the executable into /usr/bin sed -i Makefile -e 's#prefix=/usr/local#prefix=/usr#' default } @@ -44,12 +44,25 @@ src_configure(){ # do not run src_compile step as it runs git, makefile2graph, gsed, tred -src_install(){ - default - distutils-r1_src_install +python_install() { + # This is a bit unorthodox, but it allows us to get both a symlink from + # /usr/bin to our script using the correct python implementation + # *and* to import it from the python shell + python_domodule bin/*.py + python_domodule bin/tigmint-arcs-tsv + python_domodule bin/tigmint-cut + + python_doscript bin/*.py + python_doscript bin/tigmint-arcs-tsv + python_doscript bin/tigmint-cut +} + +python_install_all() { + dobin bin/tigmint + dobin bin/tigmint-make } src_test(){ default - python_foreach_impl python_test + distutils-r1_src_test }