Pregunta

I want set my package to Pypi. When I run

python setup.py sdist bdist_wininst upload

occur this error:

  File "setup.py", line 8, in <module>
    long_description=open('README.txt').read(),
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/bdist_wininst.py", line 189, in run
    self.create_exe(arcname, fullname, self.bitmap)
  File "/usr/lib/python2.7/distutils/command/bdist_wininst.py", line 271, in create_exe
    file.write(self.get_exe_bytes())
  File "/usr/lib/python2.7/distutils/command/bdist_wininst.py", line 366, in get_exe_bytes
    raise DistutilsFileError, str(msg) + ', %s not included in the Debian packages.' % filename
NameError: global name 'DistutilsFileError' is not defined

How can I fix this error?

¿Fue útil?

Solución

There seems to be a bug related to what you experience on launchpad. Look here.

Can you solve the issue by trying the solution?

Taken from the page :

This error can be corrected by adding the DistutilsFileError in the import section (line 17, of the bdist_wininst.py file)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top