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
This is the name of your project, determining how your project is listed on PyPI. Per PEP 508, valid project names must:
Consist only of ASCII letters, digits, underscores (_), hyphens (-), and/or periods (.), and
Start & end with an ASCII letter or digit.
Comparison of project names is case insensitive and treats arbitrarily-long runs of underscores, hyphens, and/or periods as equal. For example, if you register a project named cool-stuff, users will be able to download it or declare a dependency on it using any of the following spellings:
This behaviour is causing problems e.g. if you have defined in Artifactory mandatory distribution name prefix containing underscores. E.g. org_name_prefix. So if you have package named org_name_prefix_my_package it is converted by twine to distribution name org-name-prefix-my-package and then Artifactory refuses to publish such package.
Only workaround I have found is to use old way of having setup.py and using command like this setup.py sdist upload -r local which doesn't convert underscores to hyphens in distribution name.
Steps to Reproduce
Create package with name containing underscores and distribution name of the package will have converted underscores to hyphens.
The text was updated successfully, but these errors were encountered:
navrkald
added a commit
to navrkald/twine
that referenced
this issue
Aug 16, 2022
Your Environment
Your operating system:
Mac
Version of python you are running:
Python 3.7.13
pipenv
1.8.3, requests: 2.28.1, requests-toolbelt: 0.9.1, urllib3: 1.26.11)
Private package to private Artifactory.
The Issue
Underscores
_
in package name are converted to hyphens-
in generated distribution name.So e.g. for package
my_package
is created distribution namemy-package
.According to pep-508 underscore is considered as safe character so it shouldn't be converted to hyphens.
Distribution names should match following pattern:
As well mentioned in setup tools documentation
This behaviour is causing problems e.g. if you have defined in Artifactory mandatory distribution name prefix containing underscores. E.g.
org_name_prefix
. So if you have package namedorg_name_prefix_my_package
it is converted by twine to distribution nameorg-name-prefix-my-package
and then Artifactory refuses to publish such package.Only workaround I have found is to use old way of having
setup.py
and using command like thissetup.py sdist upload -r local
which doesn't convert underscores to hyphens in distribution name.Steps to Reproduce
Create package with name containing underscores and distribution name of the package will have converted underscores to hyphens.
The text was updated successfully, but these errors were encountered: