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

create fetchpypi function that generates name based urls for the prefetch sheme #22256

Closed
RonnyPfannschmidt opened this issue Jan 29, 2017 · 7 comments

Comments

@RonnyPfannschmidt
Copy link
Contributor

followup to #21637

modern pypi supports name based dispatch of different distribution types,

based on the distribution name, the distribution type (source, py2, py3, py2.3) and some extra details,
pypi can be asked for the real file

however the current mirror url for pypi hardcodes the type source

fetchpypi = {name, version, type ? "source"}: ...

since nixos will always require building binary wheels, it seems sensible to have functions fitting the python

python.fetchWheel # choosing py2/py3 type based on python version
python.fetchUniversalWheel # for the py2.py3 type
python.fetchSdist # chooses source tarball
python.fetchSdistZip # for stranger uploads
@RonnyPfannschmidt
Copy link
Contributor Author

pinging @FRidh

@FRidh
Copy link
Member

FRidh commented Jan 29, 2017

How can we retrieve a wheel given name a version? As far as I know you have to know the hash to build up an url.

@RonnyPfannschmidt
Copy link
Contributor Author

@FRidh relapce the "source" segment in the pypi.io url with the wheel type (py2, py3, py2.py3)

im working on a pr

@FRidh
Copy link
Member

FRidh commented Jan 29, 2017

can you show a couple of sample urls

@RonnyPfannschmidt
Copy link
Contributor Author

@FRidh
Copy link
Member

FRidh commented Feb 2, 2017

Thanks for your examples. I don't think we should have that many different fetchers. I've merged 695ff0d. While fetchtarball and fetchwheel are public now we might want to change that.

@FRidh FRidh closed this as completed Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants