summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl@gmail.com>2019-06-18 13:21:46 +0200
committerMichał Górny <mgorny@gentoo.org>2019-07-15 21:55:27 +0200
commit5343faf039addea236c6979cb65e5f4b259f862b (patch)
tree080c02a2388255ed1af2fb29f53c7e7f404a8ebd /dev-python/pycollada
parentapp-admin/consul: remove GOMAXPROCS from conf.d file and systemd unit (diff)
downloadgentoo-5343faf039addea236c6979cb65e5f4b259f862b.tar.gz
gentoo-5343faf039addea236c6979cb65e5f4b259f862b.tar.bz2
gentoo-5343faf039addea236c6979cb65e5f4b259f862b.zip
dev-python/pycollada: add python-3.7 support
- Fix implementation to comply to distutils-r1 eclass. - Install test data only once - Guard test running with ebegin / eend - Test only 'test_*.py' files Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Bernd Waibel <waebbl@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/12253 [mgorny: use unittest module to run tests] Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pycollada')
-rw-r--r--dev-python/pycollada/pycollada-0.6-r1.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/pycollada/pycollada-0.6-r1.ebuild b/dev-python/pycollada/pycollada-0.6-r1.ebuild
new file mode 100644
index 000000000000..47a0d7434951
--- /dev/null
+++ b/dev-python/pycollada/pycollada-0.6-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library for reading and writing COLLADA documents"
+HOMEPAGE="https://pycollada.readthedocs.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.2[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( ${RDEPEND} )
+"
+
+DOCS=( AUTHORS.md CHANGELOG.rst COPYING README.markdown )
+
+python_compile_all() {
+ if use doc ; then
+ pushd docs > /dev/null || die
+ emake html
+ popd > /dev/null || die
+ fi
+}
+
+python_install_all() {
+ if use examples ; then
+ insinto /usr/share/${P}/
+ doins -r examples
+ fi
+
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+
+ distutils-r1_python_install_all
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ # ensure data files for tests are getting installed too
+ python_moduleinto collada/tests/
+ python_domodule collada/tests/data
+}
+
+python_test() {
+ "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
+}