From a68c57b5202f87ef820d8673243b0900e858cdfc Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Thu, 12 Nov 2026 19:29:30 +0000 Subject: [PATCH] Add a small clarification about hyphens vs. underscores in tutorial Motivated by the confusion in #1316. Links to the longer page that explains the rules in detail, which was written in response to that end user confusion (see #1426). --- source/tutorials/packaging-projects.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index 1b458410d..8cf9f13b2 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -51,8 +51,11 @@ Create the following file structure locally: ├── __init__.py └── example.py -The directory containing the Python files should match the project name. This -simplifies the configuration and is more obvious to users who install the package. +The directory containing the Python files should match the project name, with +any hyphens replaced by underscores. This simplifies the configuration and is +more obvious to users who install the package. See +:doc:`/discussions/distribution-package-vs-import-package` for an explanation +of the different naming rules. Creating the file :file:`__init__.py` is recommended because the existence of an :file:`__init__.py` file allows users to import the directory as a regular package,