You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Keep project.name = "ZMS" in pyproject.toml
This is the safest if you already publish ZMS on PyPI.
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
Rename the PyPI project to Products.zms
Usually undesirable if ZMS already exists and users depend on it.
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.
The github-pypi-workflows (settings-environments-edit) now target the pypi-branch (instead of main):
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References:
QUESTION
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.tomlnow saysname = "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 likeZMS.What this means in practice:
ZMS, then the project metadata name should normally also beZMS.So your likely options are:
project.name = "ZMS"in pyproject.tomlThis is the safest if you already publish ZMS on PyPI.
Example distinction:
Usually undesirable if ZMS already exists and users depend on it.