diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-02-15 13:13:25 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-02-15 14:22:58 -0500 |
commit | 9bfe6f7939cd96c638028b8401f06df9e5181eea (patch) | |
tree | bafa28272969db7468e311542080ad9258b21d6c /dev-util/maturin | |
parent | dev-util/maturin: switch to native-tls (diff) | |
download | gentoo-9bfe6f7939cd96c638028b8401f06df9e5181eea.tar.gz gentoo-9bfe6f7939cd96c638028b8401f06df9e5181eea.tar.bz2 gentoo-9bfe6f7939cd96c638028b8401f06df9e5181eea.zip |
dev-util/maturin: install shell completion files
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-util/maturin')
-rw-r--r-- | dev-util/maturin/maturin-1.0.0_beta1-r2.ebuild (renamed from dev-util/maturin/maturin-1.0.0_beta1-r1.ebuild) | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/dev-util/maturin/maturin-1.0.0_beta1-r1.ebuild b/dev-util/maturin/maturin-1.0.0_beta1-r2.ebuild index 2336baf2beae..35e06bbbae10 100644 --- a/dev-util/maturin/maturin-1.0.0_beta1-r1.ebuild +++ b/dev-util/maturin/maturin-1.0.0_beta1-r2.ebuild @@ -399,7 +399,7 @@ CRATES_TEST=" windows_x86_64_msvc-0.42.0" DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( pypy3 python3_{9..11} ) -inherit cargo distutils-r1 edo flag-o-matic +inherit bash-completion-r1 cargo distutils-r1 edo flag-o-matic toolchain-funcs DESCRIPTION="Build and publish crates with pyo3, rust-cpython and cffi bindings" HOMEPAGE="https://www.maturin.rs/" @@ -462,6 +462,15 @@ src_configure() { python_compile_all() { use !doc || mdbook build -d html guide || die + + if ! tc-is-cross-compiler; then + local maturin=target/$(usex debug{,} release)/maturin + ${maturin} completions bash > "${T}"/${PN} || die + ${maturin} completions fish > "${T}"/${PN}.fish || die + ${maturin} completions zsh > "${T}"/_${PN} || die + else + ewarn "shell completion files were skipped due to cross-compilation" + fi } python_test() { @@ -485,4 +494,14 @@ python_test() { python_install_all() { dodoc Changelog.md README.md use doc && dodoc -r guide/html + + if ! tc-is-cross-compiler; then + dobashcomp "${T}"/${PN} + + insinto /usr/share/fish/vendor_completions.d + doins "${T}"/${PN}.fish + + insinto /usr/share/zsh/site-functions + doins "${T}"/_${PN} + fi } |