summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-01-29 12:23:28 -0500
committerSam James <sam@gentoo.org>2024-01-30 05:09:50 +0000
commitbf0a50dcf5dba209c44bd676d2fe5a31c6abae06 (patch)
tree102243a7db8b60613f0b97f983c4f554a698e0f4 /dev-vcs/git-filter-repo
parentsys-apps/busybox: remove pointless seds (diff)
downloadgentoo-bf0a50dcf5dba209c44bd676d2fe5a31c6abae06.tar.gz
gentoo-bf0a50dcf5dba209c44bd676d2fe5a31c6abae06.tar.bz2
gentoo-bf0a50dcf5dba209c44bd676d2fe5a31c6abae06.zip
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@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-vcs/git-filter-repo')
-rw-r--r--dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r2.ebuild12
1 files 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