Skip to content

remove_avoided_requirements() should check for the full package name instead of a substring #100

@tttapa

Description

@tttapa

In the current implementation, the remove_avoided_requirements function removes any packages that contain the substring cmake or patchelf in their name.
As a result, building packages using the py-build-cmake backend is impossible, since pyodide-build refuses to install it (because of the cmake in the package name).

def remove_avoided_requirements(
requires: set[str], avoided_requirements: set[str] | list[str]
) -> set[str]:
for reqstr in list(requires):
req = Requirement(reqstr)
for avoid_name in set(avoided_requirements):
if avoid_name in req.name.lower():
requires.remove(reqstr)
return requires

I suggest using avoid_name == req.name.lower() instead of avoid_name in req.name.lower().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions