From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F1B7A15800F for ; Wed, 15 Feb 2023 19:23:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B372E08A2; Wed, 15 Feb 2023 19:23:12 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1DA6BE08A2 for ; Wed, 15 Feb 2023 19:23:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5E1EB340E56 for ; Wed, 15 Feb 2023 19:23:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 355378AE for ; Wed, 15 Feb 2023 19:23:09 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1676488978.9bfe6f7939cd96c638028b8401f06df9e5181eea.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/maturin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/maturin/maturin-1.0.0_beta1-r1.ebuild dev-util/maturin/maturin-1.0.0_beta1-r2.ebuild X-VCS-Directories: dev-util/maturin/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 9bfe6f7939cd96c638028b8401f06df9e5181eea X-VCS-Branch: master Date: Wed, 15 Feb 2023 19:23:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3f3bd238-6b0f-454a-8bad-a99ca0abac94 X-Archives-Hash: 744caae56a84139d3e5ffd0f86f8dcf0 commit: 9bfe6f7939cd96c638028b8401f06df9e5181eea Author: Ionen Wolkens gentoo org> AuthorDate: Wed Feb 15 18:13:25 2023 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Wed Feb 15 19:22:58 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bfe6f79 dev-util/maturin: install shell completion files Signed-off-by: Ionen Wolkens gentoo.org> ...eta1-r1.ebuild => maturin-1.0.0_beta1-r2.ebuild} | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dev-util/maturin/maturin-1.0.0_beta1-r1.ebuild b/dev-util/maturin/maturin-1.0.0_beta1-r2.ebuild similarity index 94% rename from dev-util/maturin/maturin-1.0.0_beta1-r1.ebuild rename to 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 }