Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Relax validation of py-modules #162

Open
abravalheri opened this issue Apr 21, 2024 · 0 comments · May be fixed by #164
Open

[FR] Relax validation of py-modules #162

abravalheri opened this issue Apr 21, 2024 · 0 comments · May be fixed by #164

Comments

@abravalheri
Copy link
Owner

The pip-run project defines a py-module that has a dash in the name. It does so intentionally in order to make it possible to type python -m pip-run without having to enter any chorded characters (- is roughly 1/3 as expensive as _).

After converting the config to pyproject.toml, however, this value is rejected by policy.

ValueError: invalid pyproject.toml config: `tool.setuptools.py-modules[0]`.
configuration error: `tool.setuptools.py-modules[0]` must be python-module-name
Backend: run command get_requires_for_build_editable with args {'config_settings': None}
configuration error: `tool.setuptools.py-modules[0]` must be python-module-name
GIVEN VALUE:
    "pip-run"

OFFENDING RULE: 'format'

DEFINITION:
    {
        "type": "string",
        "format": "python-module-name"
    }

I can understand why "python-module-name" seemed like a good reasonableness check, but it turns out to be backward incompatible and unnecessarily constraining against a use-case like above.

Can we back out this change and make it lenient as it was with setup.cfg?

@jaraco in pypa/setuptools#4316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant