pexpect / ptyprocess

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

ptyprocess 0.5.1 #31

Closed papachoco closed 7 years ago

papachoco commented 8 years ago

Hello,

I was wondering if we could make ptyprocess 0.5.1 available for [legacy] easy-install installations

Thanks

Carlos

takluyver commented 8 years ago

Well, that turned up quicker than I expected.

Why do you need to use easy_install rather than pip?

papachoco commented 8 years ago

We have legacy buildout recipes and that uses setuptools

sophacles commented 8 years ago

Vaguely related - the wheel that has been uploaded to pypi does not work with:

wheel install ptyprocess-0.5.1-py2.py3-none-any.whl

It gets a:

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/veriflow/bin/wheel", line 9, in <module>
    load_entry_point('wheel==0.26.0', 'console_scripts', 'wheel')()
  File "/home/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/wheel/tool/__init__.py", line 358, in main
    args.func(args)
  File "/home/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/wheel/tool/__init__.py", line 301, in install_f
    args.wheel_dirs, args.force, args.list_files)
  File "/home/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/wheel/tool/__init__.py", line 223, in install
    wf.install(force=force)
  File "/home/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/wheel/install.py", line 268, in install
    if self.parsed_wheel_info['Root-Is-Purelib'] == 'true':
  File "/home/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/wheel/decorator.py", line 17, in __get__
    val = self.wrapped(inst)
  File "/home/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/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/vagrant/.virtualenvs/veriflow/local/lib/python2.7/site-packages/wheel-0.26.0-py2.7.egg/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'

It seems to be because the digests in the WHEEL file are hex encoded sha256, rather than urlsafe_base64_encodeed digests.

(My use case is that we distribute a tarball with all dependencies, and just wheel install *.whl from the directory)

takluyver commented 8 years ago

Oops, thanks for pointing that out, I am indeed generating hashes in the wrong format. I guess pip doesn't check them. I was also unaware that there's a separate wheel command line tool.

tlamer commented 8 years ago

Actually I've used pexpect on a machine where there is no pip and I've used setuptools for installation. For my particular usecase it would be more convenient to be able to do "python setup.py install".

papachoco commented 8 years ago

Creating the sdist and loading to pypi would be great

takluyver commented 8 years ago

I have put an sdist up so it doesn't inconvenience people while I think more about it.

If anyone's interested, the stopgap script I used to build an sdist is in a gist: https://gist.github.com/takluyver/7c66429a8e7f2b9388b0

grzn commented 7 years ago

Can you please re-register and re-uploading the wheel? there are tools that download and use the wheel if its on pypi, and doesn't fallback to sdist if the wheel is broken.

href commented 7 years ago

Yes please, I can't use wheels because some dependency pulls in ptyprocess.

leorochael commented 7 years ago

It seems this issue is documenting two separate problems:

  1. The lack of an sdist, which has been remedied

  2. The fact that the whl file for 0.5.1 is not installable by wheel.

Should we split the issues to make it clearer?

In any case, I'm also having issues with the wheel file hashes.

And on an aside, extracting the wheel on linux, e.g. with the unzip cmdline, causes the dist-info directory files to be extracted with no permissions:

$ ls -l ptyprocess-0.5.1.dist-info/
total 12
---------- 1 leonardo leonardo 1275 Jan  1  2016 METADATA
---------- 1 leonardo leonardo  656 Jan  1  2016 RECORD
---------- 1 leonardo leonardo   97 Jan  1  2016 WHEEL
leorochael commented 7 years ago

With the release of 0.5.2, I guess everything mentioned in this issue (easy_install-ability/presence of sdist; installability by wheel) has been solved and this issue can be closed, right?

takluyver commented 7 years ago

Thanks!