Skip to content

Commit

Permalink
python: Support dev-lang/pypy package
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Oct 21, 2024
1 parent ca7e233 commit be1d2e8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pkgcheck/checks/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_python_eclass(pkg):


def is_python_interpreter(pkg):
if pkg.key == "dev-lang/python":
if pkg.key in ("dev-lang/pypy", "dev-lang/python"):
# ignore python:2.7 deps since they are being phased out from eclass
# support
return pkg.slot is None or not pkg.slot.startswith("2")
Expand Down
6 changes: 6 additions & 0 deletions testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
EAPI=8

DESCRIPTION="Stub ebuild for pypy interpreter"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="2.7/1234"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ EAPI=8
DESCRIPTION="Stub ebuild for pypy3 interpreter"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="0/pypy310"
SLOT="3.10/pypy310-1234"
2 changes: 1 addition & 1 deletion testdata/repos/python/eclass/python-any-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _python_set_impls() {
PYTHON_DEPS+=" dev-lang/python:${slot}"
;;
pypy3)
PYTHON_DEPS+=" dev-python/pypy3:="
PYTHON_DEPS+=" >=dev-lang/pypy-3.10:="
;;
esac
done
Expand Down
2 changes: 1 addition & 1 deletion testdata/repos/python/eclass/python-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _python_set_impls() {
PYTHON_DEPS+=" python_targets_${i}? ( dev-lang/python:${slot} )"
;;
pypy3)
PYTHON_DEPS+=" python_targets_${i}? ( dev-python/pypy3:= )"
PYTHON_DEPS+=" python_targets_${i}? ( >=dev-lang/pypy-3.10:= )"
;;
esac
done
Expand Down
2 changes: 1 addition & 1 deletion testdata/repos/python/eclass/python-single-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _python_set_impls() {
PYTHON_DEPS+=" python_single_target_${i}? ( dev-lang/python:${slot} )"
;;
pypy3)
PYTHON_DEPS+=" python_single_target_${i}? ( dev-python/pypy3:= )"
PYTHON_DEPS+=" python_single_target_${i}? ( >=dev-lang/pypy-3.10:= )"
;;
esac
done
Expand Down

0 comments on commit be1d2e8

Please sign in to comment.