Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project name transformed upon upload #45

Closed
devpi-bot opened this issue Mar 31, 2017 · 3 comments
Closed

project name transformed upon upload #45

devpi-bot opened this issue Mar 31, 2017 · 3 comments

Comments

@devpi-bot
Copy link
Collaborator

We came across a strange issue when uploading release files where the name contains _ in the name (in this case the name is gti_utils)

The setup file looks like this:

#!python

    setup(
            # Package name
            name              = 'gti_utils',
            version           = __version__,
            
            # Information about what needs to be packaged
            package_dir       = {'':'src'},
            packages          = find_packages('src'),
            scripts           = [],

The actual package name is gti_scutils. If I generate the package manually, I do get the right file::

#!bash

$ python setup.py sdist
running sdist
running egg_info
writing src/gti_utils.egg-info/PKG-INFO
writing top-level names to src/gti_utils.egg-info/top_level.txt
writing dependency_links to src/gti_utils.egg-info/dependency_links.txt
writing entry points to src/gti_utils.egg-info/entry_points.txt
reading manifest file 'src/gti_utils.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/gti_utils.egg-info/SOURCES.txt'
...
Writing gti_utils-0.3.0rc/setup.cfg
Creating tar archive
removing 'gti_utils-0.3.0rc' (and everything under it)

But if I perform an upload with devpi I endup with the release file gti_utils-0.3.0rc registered under gti-utils. Devpi also creates an empty project with the appropriate name gti_utils.

When listing the index we find out this:

#!bash

$ devpi list
list result: http://devpi-eu.dolby.net/lpbrac/dev/
dolby-commander
dolby_commander
gti-utils
gti_utils
$ devpi list gti-utils
list result: http://devpi-eu.dolby.net/lpbrac/dev/
lpbrac/dev/gti_utils/0.3.0rc/gti_utils-0.3.0rc.tar.gz
(gti_utils)lpbrac@lpbrac-ubuntu-vm:~/p4ws/main/qa/tools/gti_utils$ devpi list gti_utils
list result: http://devpi-eu.dolby.net/lpbrac/dev/

The release file gti_utils-0.3.0rc.tar.gz (note the _) can be listed with gti-utils while gti_utils returns nothing.

Finally note the following. I can remove gti-utils but can't delete gti_utils as shown below:

#!bash
$ devpi remove gti-utils
About to remove the following release files and metadata:
   lpbrac/dev/gti_utils/0.3.0rc/gti_utils-0.3.0rc.tar.gz
Are you sure (yes/no)? yes 
$ devpi remove gti_utils
nothing to delete
$ devpi list 
list result: http://devpi-eu.dolby.net/lpbrac/dev/
dolby-commander
dolby_commander
gti_utils

@devpi-bot
Copy link
Collaborator Author

Original comment by @hpk42

Seems like we need to give name mangling/normalization more scrutiny. It looks like incomplete normalization. FYI, If you go to https://pypi.python.org/simple/pytest_pep8/ (note the underscore) you'll end up at "pytest-pep8". If you try to use "pytest_pep8" with xmlrpc/json apis, you get a failure.

@devpi-bot
Copy link
Collaborator Author

Original comment by @hpk42

much better project name normalization was released with 1.1

@devpi-bot
Copy link
Collaborator Author

Original comment by @lbrack

Confirming. Thanks.

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

No branches or pull requests

1 participant