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

Use shell to pip to extract hashes #58

Closed
peterbe opened this issue Mar 20, 2018 · 6 comments
Closed

Use shell to pip to extract hashes #58

peterbe opened this issue Mar 20, 2018 · 6 comments

Comments

@peterbe
Copy link
Owner

peterbe commented Mar 20, 2018

We currently rely on _hash_of_file to extract the checksum of a package using pip. Yuck! We should use a shell and call like this:

subprocess.call(['python', '-m', 'pip', 'hash', ...])

Thanks @di for the tip!

@peterbe peterbe changed the title Use shell to pip to extrac checksums Use shell to pip to extract checksums Mar 20, 2018
@peterbe peterbe changed the title Use shell to pip to extract checksums Use shell to pip to extract hashes Mar 20, 2018
@di
Copy link
Contributor

di commented Mar 20, 2018

I actually have something even better in the works, hang tight...

@di
Copy link
Contributor

di commented Mar 20, 2018

Hmm, seems like this won't fly with 2.6 for some reason:

$ python2.6 -m pip
/Users/di/.pyenv/versions/2.6.9/bin/python2.6: pip is a package and cannot be directly executed

works fine for other things though:

$ python2.6 -m unittest

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

@peterbe How do you feel about officially dropping Python 2.6 support? It's nearly 5 years past end-of-life at this point. Pip itself will be dropping support for Python 2.6 with the 10.0 release as well...

@di
Copy link
Contributor

di commented Mar 20, 2018

Heh, looks like you already did: e655e64

@peterbe
Copy link
Owner Author

peterbe commented Mar 21, 2018

Thing is, about e655e64, is that it only dropped 2.6 in terms of testing in Travis. The reason was that 2.6 couldn't be installed. Neither could 3.3.

I did rearrange things in the travis and tox file. Perhaps I rushed it. So I'll try again Seems that you can get 2.6 on Travis but now it's failing on something else related to setuptools and I just don't know if I care.

@di your python2.6 -m unittest ran 0 tests :)

Would it work with your 2.6 if it has pip installed separately? I.e. download pip; cd downloaded-pip; /Users/di/.pyenv/versions/2.6.9/bin/python2.6 setup.py install
Does python2.6 -m pip work then?

@peterbe
Copy link
Owner Author

peterbe commented Mar 21, 2018

@di see my latest comment on #60 (comment)
Perhaps I'm just being lazy but I'm happy to just ignore 2.6 and 3.3 going forward in life.

@di
Copy link
Contributor

di commented Mar 21, 2018

@peterbe I think that's totally reasonable!

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

2 participants