commit:     4757774468319fcc805c4d3b3b8ee5acaf03bcac
Author:     Palmer Dabbelt <palmer <AT> rivosinc <DOT> com>
AuthorDate: Mon Oct 10 23:41:30 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 12 23:24:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47577744

dev-vcs/git-filter-repo: Move to distutils-r1, bump to -r1

The new b4 depends on git-filter-repo as a module, not just as a script.
This converts git-filter-repo over to distutils-r1, via two hacks:

* The package provides a setup.py, but it's not in a standard location.
* The github packages don't provide a PKG-INFO so distutils can't find
  the version, this just makes a minimal one inline.

With those I can get git-filter-repo installed as both a script and a
module.  I've bumped the version of these to -r1 so users get a rebuild
with the new files.

Signed-off-by: Palmer Dabbelt <palmer <AT> rivosinc.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...3.0.ebuild => git-filter-repo-2.33.0-r1.ebuild} | 19 +++++++-------
 ...4.0.ebuild => git-filter-repo-2.34.0-r1.ebuild} | 19 +++++++-------
 ...8.0.ebuild => git-filter-repo-2.38.0-r1.ebuild} | 29 +++++++++++-----------
 3 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.33.0.ebuild 
b/dev-vcs/git-filter-repo/git-filter-repo-2.33.0-r1.ebuild
similarity index 76%
rename from dev-vcs/git-filter-repo/git-filter-repo-2.33.0.ebuild
rename to dev-vcs/git-filter-repo/git-filter-repo-2.33.0-r1.ebuild
index dfc0b43cc287..26a92dc53d0a 100644
--- a/dev-vcs/git-filter-repo/git-filter-repo-2.33.0.ebuild
+++ b/dev-vcs/git-filter-repo/git-filter-repo-2.33.0-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{9..10} )
-inherit python-single-r1
+inherit distutils-r1
 
 DESCRIPTION="Quickly rewrite git repository history (filter-branch 
replacement)"
 HOMEPAGE="https://github.com/newren/git-filter-repo/";
@@ -20,16 +20,17 @@ RDEPEND="
        ${PYTHON_DEPS}
        >=dev-vcs/git-2.24.0"
 
-src_compile() {
-       :
+S="${S}/release"
+
+src_prepare() {
+       eapply_user
+       cat > PKG-INFO <<EOF
+Metadata-Version: 2.1
+Name: git-filter-repo
+Version: ${PV}
+EOF
 }
 
 src_test() {
        bash t/run_tests || die
 }
-
-src_install() {
-       python_fix_shebang git-filter-repo
-       dobin git-filter-repo
-       doman Documentation/man1/git-filter-repo.1
-}

diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.34.0.ebuild 
b/dev-vcs/git-filter-repo/git-filter-repo-2.34.0-r1.ebuild
similarity index 76%
rename from dev-vcs/git-filter-repo/git-filter-repo-2.34.0.ebuild
rename to dev-vcs/git-filter-repo/git-filter-repo-2.34.0-r1.ebuild
index dfc0b43cc287..26a92dc53d0a 100644
--- a/dev-vcs/git-filter-repo/git-filter-repo-2.34.0.ebuild
+++ b/dev-vcs/git-filter-repo/git-filter-repo-2.34.0-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{9..10} )
-inherit python-single-r1
+inherit distutils-r1
 
 DESCRIPTION="Quickly rewrite git repository history (filter-branch 
replacement)"
 HOMEPAGE="https://github.com/newren/git-filter-repo/";
@@ -20,16 +20,17 @@ RDEPEND="
        ${PYTHON_DEPS}
        >=dev-vcs/git-2.24.0"
 
-src_compile() {
-       :
+S="${S}/release"
+
+src_prepare() {
+       eapply_user
+       cat > PKG-INFO <<EOF
+Metadata-Version: 2.1
+Name: git-filter-repo
+Version: ${PV}
+EOF
 }
 
 src_test() {
        bash t/run_tests || die
 }
-
-src_install() {
-       python_fix_shebang git-filter-repo
-       dobin git-filter-repo
-       doman Documentation/man1/git-filter-repo.1
-}

diff --git a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0.ebuild 
b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild
similarity index 61%
rename from dev-vcs/git-filter-repo/git-filter-repo-2.38.0.ebuild
rename to dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild
index f51f33fa7528..26a92dc53d0a 100644
--- a/dev-vcs/git-filter-repo/git-filter-repo-2.38.0.ebuild
+++ b/dev-vcs/git-filter-repo/git-filter-repo-2.38.0-r1.ebuild
@@ -1,16 +1,15 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..11} )
-inherit python-single-r1
+PYTHON_COMPAT=( python3_{9..10} )
+inherit distutils-r1
 
 DESCRIPTION="Quickly rewrite git repository history (filter-branch 
replacement)"
 HOMEPAGE="https://github.com/newren/git-filter-repo/";
 SRC_URI="
-       
https://github.com/newren/git-filter-repo/releases/download/v${PV}/${P}.tar.xz
-"
+       
https://github.com/newren/git-filter-repo/releases/download/v${PV}/${P}.tar.xz";
 
 LICENSE="MIT"
 SLOT="0"
@@ -19,19 +18,19 @@ REQUIRED_USE=${PYTHON_REQUIRED_USE}
 
 RDEPEND="
        ${PYTHON_DEPS}
-       >=dev-vcs/git-2.24.0
-"
+       >=dev-vcs/git-2.24.0"
 
-src_compile() {
-       :
+S="${S}/release"
+
+src_prepare() {
+       eapply_user
+       cat > PKG-INFO <<EOF
+Metadata-Version: 2.1
+Name: git-filter-repo
+Version: ${PV}
+EOF
 }
 
 src_test() {
        bash t/run_tests || die
 }
-
-src_install() {
-       python_fix_shebang git-filter-repo
-       dobin git-filter-repo
-       doman Documentation/man1/git-filter-repo.1
-}

Reply via email to