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 C5C17158089 for ; Sun, 10 Sep 2023 16:51:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEE832BC017; Sun, 10 Sep 2023 16:51:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0C962BC017 for ; Sun, 10 Sep 2023 16:51:52 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 97286335C4E for ; Sun, 10 Sep 2023 16:51:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B955C116F for ; Sun, 10 Sep 2023 16:51:49 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1694364705.68300ff09cb4e71311704290bc800bc913eb881f.mattst88@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/autojump/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/autojump/autojump-22.5.3-r2.ebuild X-VCS-Directories: app-shells/autojump/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 68300ff09cb4e71311704290bc800bc913eb881f X-VCS-Branch: master Date: Sun, 10 Sep 2023 16:51:49 +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: fa944de7-6b1c-4529-80d4-a1fe650c4643 X-Archives-Hash: 485e2b9d16fcc99c7deacbf6764c7992 commit: 68300ff09cb4e71311704290bc800bc913eb881f Author: Matt Turner gentoo org> AuthorDate: Sun Sep 10 16:51:06 2023 +0000 Commit: Matt Turner gentoo org> CommitDate: Sun Sep 10 16:51:45 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68300ff0 app-shells/autojump: Migrate to PEP517 build Closes: https://bugs.gentoo.org/909894 Signed-off-by: Matt Turner gentoo.org> app-shells/autojump/autojump-22.5.3-r2.ebuild | 88 +++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/app-shells/autojump/autojump-22.5.3-r2.ebuild b/app-shells/autojump/autojump-22.5.3-r2.ebuild new file mode 100644 index 000000000000..709493ffca2a --- /dev/null +++ b/app-shells/autojump/autojump-22.5.3-r2.ebuild @@ -0,0 +1,88 @@ +# 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_{10..11} ) +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 vcs-snapshot prefix + +DESCRIPTION="change directory command that learns" +HOMEPAGE="https://github.com/wting/autojump" +SRC_URI="https://github.com/wting/${PN}/archive/release-v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~x64-macos" +IUSE="ipython test" +REQUIRED_USE="ipython? ( ${PYTHON_REQUIRED_USE} )" + +RESTRICT="!test? ( test )" +RDEPEND="ipython? ( ${PYTHON_DEPS} )" +DEPEND="${PYTHON_DEPS} + test? ( + >=dev-vcs/pre-commit-0.7.0[${PYTHON_SINGLE_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${PV}-Use-mock-from-unittest.patch +) + +src_prepare() { + default + sed -e "s:/usr/local/share:/usr/share:" \ + -i bin/autojump.sh || die + + # autojump_argparse is only there for Python 2.6 compatibility + sed -e "s:autojump_argparse:argparse:" \ + -i bin/autojump || die + + hprefixify -q '"' -w '/usr\/share/' bin/autojump.sh +} + +src_compile() { + : +} + +src_install() { + dobin bin/"${PN}" + python_doscript "${ED}"/usr/bin/"${PN}" + + insinto /etc/profile.d + doins bin/"${PN}".sh + + insinto /usr/share/"${PN}"/ + doins bin/"${PN}.bash" + doins bin/"${PN}.zsh" + doins bin/"${PN}.fish" + insinto /usr/share/zsh/site-functions + doins bin/_j + + python_domodule bin/autojump_argparse.py bin/autojump_data.py \ + bin/autojump_match.py bin/autojump_utils.py + if use ipython; then + python_domodule tools/autojump_ipython.py + fi + + doman docs/"${PN}.1" + einstalldocs +} + +pkg_postinst() { + if use ipython; then + elog 'This tool provides "j" for ipython, please add' + elog '"import autojump_ipython" to your ipy_user_conf.py.' + elog + fi + + elog 'If you use app-shells/fish, add the following code to your' + elog 'config.fish to get autojump support:' + elog 'if test -f /usr/share/autojump/autojump.fish' + elog ' source /usr/share/autojump/autojump.fish' + elog 'end' +}