Skip to content

package_name used different ways should set/validated differently #621

@sverhoeven

Description

@sverhoeven

Checklist before submitting an issue

  • I have checked the existing issues and couldn't find an issue about this bug.

When #211 was fixed there was package_name and directory_name questions.

Issue details

The package_name question value is used in multiple places:

  1. name on pypi, in template/pyproject.toml:project.name
  2. name when importing, in template/src/{{package_name}}

The name on pypi and import could be different for an existing package or a template user might want to have them different.

See https://blogs.gentoo.org/mgorny/2023/02/09/the-inconsistencies-around-python-package-naming-and-the-new-policy/ for a comparison what naming styles there are.

Could there be a warning when given package name does not follow PEP8?
Could package_name be split into package_name and directory_name? Maybe have the second question have default of the first answer.

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