public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git-filter-repo/
Date: Tue, 30 Jan 2024 05:10:38 +0000 (UTC)	[thread overview]
Message-ID: <1706591390.bf0a50dcf5dba209c44bd676d2fe5a31c6abae06.sam@gentoo> (raw)

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


             reply	other threads:[~2024-01-30  5:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  5:10 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-20 22:25 [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git-filter-repo/ Mike Pagano
2024-08-16 10:15 Mike Pagano
2024-08-16 10:14 Mike Pagano
2024-04-14 18:11 Michał Górny
2024-04-14 18:11 Michał Górny
2024-01-30 10:51 Sam James
2024-01-30  6:22 Sam James
2024-01-30  6:18 Sam James
2024-01-30  6:18 Sam James
2024-01-30  6:18 Sam James
2024-01-30  6:18 Sam James
2024-01-30  5:10 Sam James
2024-01-29  6:38 WANG Xuerui
2023-12-17 14:06 Mart Raudsepp
2023-01-10  4:44 Sam James
2023-01-10  4:44 Sam James
2022-12-30  1:09 Sam James
2022-10-12 23:32 Sam James
2022-10-12 23:32 Sam James
2022-10-12 23:32 Sam James
2022-10-12 23:32 Sam James
2022-10-12 23:32 Sam James
2022-10-11 12:24 Michał Górny
2021-11-16  7:49 Michał Górny
2021-10-29 12:19 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1706591390.bf0a50dcf5dba209c44bd676d2fe5a31c6abae06.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox