summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2019-07-08 21:21:54 -0600
committerTim Harder <radhermit@gentoo.org>2019-07-08 21:21:54 -0600
commit15c4d9d791de861554120405db1a8475f1ec0405 (patch)
tree313ca9074842f5f4d248f63e66370d379687b6b1 /dev-python/kconfiglib/kconfiglib-12.12.1.ebuild
parentmedia-sound/audiotools: initial import (diff)
downloadgentoo-15c4d9d791de861554120405db1a8475f1ec0405.tar.gz
gentoo-15c4d9d791de861554120405db1a8475f1ec0405.tar.bz2
gentoo-15c4d9d791de861554120405db1a8475f1ec0405.zip
dev-python/kconfiglib: initial import
Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to 'dev-python/kconfiglib/kconfiglib-12.12.1.ebuild')
-rw-r--r--dev-python/kconfiglib/kconfiglib-12.12.1.ebuild39
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-python/kconfiglib/kconfiglib-12.12.1.ebuild b/dev-python/kconfiglib/kconfiglib-12.12.1.ebuild
new file mode 100644
index 000000000000..42e22c8f41fb
--- /dev/null
+++ b/dev-python/kconfiglib/kconfiglib-12.12.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+# menuconfig script doesn't work on py2 so skip it
+PYTHON_COMPAT=( python3_{5,6,7} pypy3 )
+PYTHON_REQ_USE="ncurses"
+
+inherit distutils-r1
+
+DESCRIPTION="A flexible Python Kconfig implementation"
+HOMEPAGE="https://github.com/ulfalizer/Kconfiglib https://pypi.org/project/kconfiglib/"
+SRC_URI="https://github.com/ulfalizer/Kconfiglib/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+# pypi tarballs don't include tests
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P/k/K}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # hacks to run tests
+ mkdir Kconfiglib || die
+ ln -s ../tests Kconfiglib || die
+ # don't run kernel Kconfig compat tests
+ sed -i 's/run_compatibility_tests()$/#\0/' testsuite.py || die
+}
+
+python_test() {
+ "${PYTHON}" testsuite.py || die "tests failed with ${EPYTHON}"
+}