-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
maturin init/new
should validate the package name
#1398
Comments
Agreed it's nice to have, pull requests are welcome. |
Can I please work on this one please ? |
@mahtantaoui No need to ask permission to work on issues, feel free to send pull requests, thanks! |
Can we validate the package name using a combination of an approach similar to the one in Cargo for Rust names and the constraint in PYPI for Python? |
I think so, pull requests are welcome! |
See also: rust-lang/cargo#12766 |
permalink to the pypi/warehouse name constraint |
Package names of Rust libraries and package names of Python libraries both need to fulfill certain criteria.
maturin init/new
apparently currently doesn't check for any of these criteria e.g.maturin init "foo bar"
works fine even though neither Rust nor Python support package names with a space.I think ideally maturin would check the supplied name against two regexes (one for Rust package names and one for Python package names) and report which check failed in case the supplied name doesn't match.
Note that I think PyPI disallows certain package names like names of modules in the standard library ... it would be nice if maturin could check for these as well but that might not be easily doable (see also pypi/warehouse#8533).
The text was updated successfully, but these errors were encountered: