Skip to content

pkgconf can unintentionally break users that install into global python installation #98

@virtuald

Description

@virtuald

Now of course we can argue that users shouldn't do that and only use virtualenv, but... well here we are. RobotPy is a pretty small project, but it seems to me that if eventually something like numpy/scipy eventually adopts using pkgconf-pypi then a lot more users will run into this problem.

My goal for pkgconf-pypi is to only find pkgconf packages in the python ecosystem. However, since it provides a pkgconf executable, it's understandable that users would expect it to behave like a system-installed pkgconf. What to do?

The most obvious thing to me would be to provide a pkgconf-pypi executable and a pkgconf executable. The pkgconf executable is just a normal pkgconf executable that doesn't do anything special, and the pkgconf-pypi is our current pkgconf replacement script. Then the special behavior is something you have to explicitly opt into, and just becomes something that has to be configured for python wheel builders.

An alternative solution would be to only enable the special behavior if an environment variable or argument was set/used, but that seems like a Bad Idea.

I know meson can be told to use a different pkgconf executable in a cross.txt file... I'm not sure if there's another way to do it in pyproject.toml so that meson-python/hatch-meson could use that instead. cmake probably can be configured this way too?

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