pexpect / ptyprocess

Run a subprocess in a pseudo terminal
https://ptyprocess.readthedocs.io/en/latest/
Other
222 stars 71 forks source link

Incorrect distributive in WHEEL format #40

Closed Cykooz closed 7 years ago

Cykooz commented 7 years ago

I had tried to install the ptyprocess package from "whl" file and got an error:

$ ./bin/wheel install -d ~/wheels/ ptyprocess
Traceback (most recent call last):
  File "./bin/wheel", line 11, in <module>
    sys.exit(main())
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/tool/__init__.py", line 356, in main
    args.func(args)
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/tool/__init__.py", line 299, in install_f
    args.wheel_dirs, args.force, args.list_files)
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/tool/__init__.py", line 221, in install
    wf.install(force=force)
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/install.py", line 268, in install
    if self.parsed_wheel_info['Root-Is-Purelib'] == 'true':
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/decorator.py", line 17, in __get__
    val = self.wrapped(inst)
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/install.py", line 238, in parsed_wheel_info
    return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
  File "/usr/lib/python2.7/zipfile.py", line 935, in read
    return self.open(name, "r", pwd).read()
  File "/usr/lib/python2.7/zipfile.py", line 630, in read
    data = self.read1(n)
  File "/usr/lib/python2.7/zipfile.py", line 692, in read1
    self._update_crc(data, eof=eof)
  File "/home/cykooz/testvenv/local/lib/python2.7/site-packages/wheel/install.py", line 463, in _update_crc
    raise BadWheelFile("Bad hash for file %r" % ef.name)
wheel.install.BadWheelFile: Bad hash for file 'ptyprocess-0.5.1.dist-info/WHEEL'

This is because of hashes of files (saved in file ptyprocess-0.5.1-py2.py3-none-any.whl/ptyprocess-0.5.1.dist-info/RECORD) stored in invalid format. Instead of using BASE64-encoded SHA256-digest your hashes stored as HEX-string from SHA256 digest.

Please, rebuild WHL distributive of your package and put it into pypi.python.org.

takluyver commented 7 years ago

Sorry about that, should be fixed with 0.5.2.