Skip to content

PyPI-Project Name: ZMS vs Products.zms#495

Open
drfho wants to merge 6 commits into
mainfrom
pypi
Open

PyPI-Project Name: ZMS vs Products.zms#495
drfho wants to merge 6 commits into
mainfrom
pypi

Conversation

@drfho

@drfho drfho commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

References:

  1. chore(pyproject): Renamed and enabled namespaces #483
  2. 58faa1c

QUESTION

The project cannot get published on PyPI as "ZMS" anymore because in pyproject.toml the project-name has changed. Is there an option for an alias name that is used exclusively by the PyPI-worklow?

ANSWER

By Copilot

No — there isn’t a PyPI-only “alias name” field in pyproject.toml.

For Python packaging, the distribution name is the project’s canonical package name, and tools expect that name consistently across builds and publishing. So if your pyproject.toml now says name = "Products.zms", that is the name build backends and installers will treat as the distribution name; PyPI won’t separately map that to an unrelated published name like ZMS.

What this means in practice:

  • If you want the package on PyPI to remain ZMS, then the project metadata name should normally also be ZMS.
  • Installing from Git can still target the same project, but pip will compare the built package metadata name, so the built distribution name should match what is expected.
  • The import package name and the distribution name do not have to be identical, but the published distribution name itself does not get a special PyPI-only alias.

So your likely options are:

  1. Keep project.name = "ZMS" in pyproject.toml
    This is the safest if you already publish ZMS on PyPI.
  2. Use Products.zms only as the Python import/package path, not the distribution name.
    Example distinction:
    • distribution/package on PyPI: ZMS
    • import path in code: Products.zms
  3. Rename the PyPI project to Products.zms
    Usually undesirable if ZMS already exists and users depend on it.

@drfho

drfho commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Purpose of branch "pypi" is to publish ZMS into pypi-package-index with its brand-name "ZMS". Since pip enforces the use a project-name that corresponds to the path of module files and there is no option for an alias we have to communicate with a modified pyproject.toml-file.

image

The github-pypi-workflows (settings-environments-edit) now target the pypi-branch (instead of main):

image

IMPORTANT NOTE: Before running the pypi-workflow the version.txt file
https://github.com/zms-publishing/ZMS/blob/main/Products/zms/version.txt
need to be changed/updated and a new git-version tag should be set.

image

Screen image: the module imports are working conventionally
image

drfho added a commit that referenced this pull request Jun 11, 2026
@drfho

drfho commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@cmeier76

pip install -e "ZMS @ git+https://github.com/zms-publishing/ZMS.git@pypi"
works similar to
pip install -e "Products.zms @ git+https://github.com/zms-publishing/ZMS.git@main"

Discussion:
maybe revoke the former change of project-name in main-branch?

@cmeier76

cmeier76 commented Jun 11, 2026

Copy link
Copy Markdown
Member

Discussion:
Maybe we should revert the previous change to the project name in the main branch?

I think so. It seems that namespaces = true introduced in #483 does the trick – regardless of [project] name.

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 this pull request may close these issues.

2 participants