From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1595677-garchives=archives.gentoo.org@lists.gentoo.org>
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 F412215838C
	for <garchives@archives.gentoo.org>; Tue, 30 Jan 2024 05:10:43 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D47BCE2A4E;
	Tue, 30 Jan 2024 05:10:41 +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 B6DB5E2A4E
	for <gentoo-commits@lists.gentoo.org>; Tue, 30 Jan 2024 05:10:41 +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 8A8273430A4
	for <gentoo-commits@lists.gentoo.org>; Tue, 30 Jan 2024 05:10:40 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id DBF1B14B6
	for <gentoo-commits@lists.gentoo.org>; Tue, 30 Jan 2024 05:10:38 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1706591390.bf0a50dcf5dba209c44bd676d2fe5a31c6abae06.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git-filter-repo/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
X-VCS-Directories: dev-vcs/git-filter-repo/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: bf0a50dcf5dba209c44bd676d2fe5a31c6abae06
X-VCS-Branch: master
Date: Tue, 30 Jan 2024 05:10:38 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 140f297a-7a66-44e6-a224-a896045ff5b5
X-Archives-Hash: fe5375b96a5cff1f44841cab369b3896

commit:     bf0a50dcf5dba209c44bd676d2fe5a31c6abae06
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Jan 29 17:23:28 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 05:09:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf0a50dc

dev-vcs/git-filter-repo: replace crude hack with upstream version hints

setuptools-scm has a number of ways to detect the version of a package.
Of course getting it from a git repo is the base approach. For pypi
tarballs, it detects the version from the PKG-INFO file shipped in
sdists.

We have neither. But setuptools-scm also supports manually overriding it
in cases where you *know* the answer. There is no need to create a dummy
file: just export the "PRETEND_VERSION" variable and setuptools-scm will
respect it as an override.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
index 7e7515e9e497..57e222c4e00d 100644
--- a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
+++ b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild
@@ -22,15 +22,9 @@ RDEPEND="
 
 S="${S}/release"
 
-python_prepare_all() {
-	cat > PKG-INFO <<-EOF || die
-	Metadata-Version: 2.1
-	Name: git-filter-repo
-	Version: ${PV}
-	EOF
-
-	distutils-r1_python_prepare_all
-}
+# the git-archive tarball does not have version info; setuptools-scm
+# requires a valid source of version info, this one is for distros
+export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
 
 python_test() {
 	cd .. || die