summaryrefslogtreecommitdiff
path: root/dev-python/textX/textX-3.1.1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-12 09:56:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-12 09:56:54 +0000
commitebc282ef4dfa408accac685565b8ee5f6faec119 (patch)
treec0a4f713228cda0ab17eed46f0bb7ca8cb8be2f6 /dev-python/textX/textX-3.1.1.ebuild
parent6c8694a707151d59555b0e4e48235f085ce166c3 (diff)
gentoo auto-resync : 12:02:2023 - 09:56:54
Diffstat (limited to 'dev-python/textX/textX-3.1.1.ebuild')
-rw-r--r--dev-python/textX/textX-3.1.1.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-python/textX/textX-3.1.1.ebuild b/dev-python/textX/textX-3.1.1.ebuild
new file mode 100644
index 000000000000..2ef355c35dfd
--- /dev/null
+++ b/dev-python/textX/textX-3.1.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="Meta-language for DSL implementation inspired by Xtext"
+HOMEPAGE="
+ https://pypi.org/project/textX/
+ https://github.com/textX/textX/
+"
+SRC_URI="
+ https://github.com/textX/textX/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-python/Arpeggio-2.0.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_test() {
+ cp -a "${BUILD_DIR}"/{install,test} || die
+ local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
+
+ # Update the shebang
+ sed -e "s:install/usr/bin/${EPYTHON}:test/usr/bin/${EPYTHON}:" \
+ -i "${BUILD_DIR}"/test/usr/bin/textx || die
+
+ # Install necessary plugins
+ local plugins=(
+ tests/functional/subcommands/example_project
+ tests/functional/registration/projects/*
+ )
+ local p
+ for p in "${plugins[@]}"; do
+ pushd "${p}" >/dev/null || die
+ distutils_pep517_install "${BUILD_DIR}"/test
+ popd >/dev/null || die
+ done
+
+ epytest tests/functional
+}