Skip to content

Support expanding globs/path wildcards in configuration #1571

@webknjaz

Description

@webknjaz

Currently, if you put a command like delocate-wheel dist/*.whl in tox.ini, that command (delocate-wheel) will get "dist/*.whl" string as its arg. But if you run it in shell, it'll get the list of matching paths.

Some programs are okay with that and apply glob internally while others don't know how to do this. Or, in case of delocate, it does it partially but has a bug where it outputs a file with an invalid filename called *.whl.

So in some cases, it's reasonable to want to expand a glob explicitly.

I suggest adding a new substitution syntax. This is what I have in mind:

commands =
  {envpython} -m some-command {glob:dist/*.whl} {glob:**/*.tar.gz:fallback/path/without/substitutions.txt} {env:VAR:{glob:fallback/*.zip}}

Refs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationenhancementfeature:newsomething does not exist yet, but shouldhelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions