Invalid egg file name: (param1)
Package:
wheel
251
Exception Class:
WheelError
Raise code
def egg2wheel(egg_path, dest_dir):
filename = os.path.basename(egg_path)
match = egg_info_re.match(filename)
if not match:
raise WheelError('Invalid egg file name: {}'.format(filename))
egg_info = match.groupdict()
dir = tempfile.mkdtemp(suffix="_e2w")
if os.path.isfile(egg_path):
# assume we have a bdist_egg otherwise
Links to the raise (1)
https://github.com/pypa/wheel/blob/6e86e6b886d7744cba1faa80bf3d12c8ac8db3f8/src/wheel/cli/convert.py#L41Ways to fix
To be compiled to the wheel, the .egg
filename must match the next format:
(?P<name>.+?)-(?P<ver>.+?)(-(?P<pyver>py\d\.\d+)(-(?P<arch>.+?))?)?.egg$
Examples of correct name:
example-0.1-py3.5.egg
The arch
param is missing in the example and it is ok, because he is optional, as you can see in RegExp (it has ?
). However, filename can also include architecture if it has some native architecture compatible dependencies inside:
visionegg-1.2.1-py2.5-win32.egg
The info:
- "Egg" is a single file distribution format for Python projects.
- They hold some metadata such as licensing details, release dependencies, etc.
- The .egg file is a
.zip
file. So if you change the extension to “zip”, you can extract the archive. - if you have some
.egg
file, you could install it as a package usingeasy_install
the command - Read how to create an egg in python to try it out
Add a possible fix
Please authorize to post fix