Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/pkgcheck/checks/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,12 @@ def feed(self, pkgs):
if len(pypi_remotes) != 1:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated- this should be a warning IMO so we can isolate how to handle this better. That situation shouldn't exist- if it does, it points at a bad metadata.xml definition, or something (again) we should address.

return

pypi_name = pypi_remotes[0].name

# skip empty remotes
if pypi_name is None:
return

def normalize(project: str) -> str:
"""
Normalize project name using PEP 503 rules
Expand All @@ -1110,6 +1116,5 @@ def normalize(project: str) -> str:
"""
return PROJECT_SYMBOL_NORMALIZE_RE.sub("-", project).lower()

pypi_name = pypi_remotes[0].name
if pkg.package != normalize(pypi_name):
yield PythonMismatchedPackageName(normalize(pypi_name), pkg=pkg)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Ebuild with empty PyPi remote-id in metadata.xml"
HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD"
SLOT="0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="pypi"></remote-id>
</upstream>
</pkgmetadata>
Loading