Skip to content

maturin init/new should validate the package name #1398

Closed
@not-my-profile

Description

@not-my-profile

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions