merely-useful / py-rse

Research Software Engineering with Python course material

Home Page:http://third-bit.com/py-rse/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wheel distribution explanation

sida-wang opened this issue · comments

Section 14.5 mentions two types of distributions: source distributions and wheel distributions. While source distributions are explained and have a glossary term, wheel distributions are mentioned once in the sentence

We have now uploaded both types of distribution, allowing people to use the wheel distribution if their system supports it or the source distribution if it does not.

I think it might be worth having an extra sentence that explains what it is as well as a glossary term. My google searches suggest that its a built version of the source code which makes for a faster installation but I'm still a bit unsure.

Thanks for picking this up, @sida-wang.

Despite that fact that we say in text that "we have now uploaded both types of distribution", we actually only upload the source distribution:

Screen Shot 2021-01-13 at 9 04 51 am

That's because we ran:

$ python setup.py sdist

instead of:

$ python setup.py sdist bdist_wheel

We have two options to fix this problem:

  1. Update the text to reflect that fact that we only uploaded a source distribution. This means we'd just need to delete the sentence that says we uploaded both types of distribution. We could also add a call out box about wheels linking people to this Real Python page for more information.
  2. Upload a wheel distribution as well. For this we'd need @k8hertweck to run $ python setup.py sdist bdist_wheel so that https://test.pypi.org/project/pyzipf and https://pypi.org/project/pyzipf/ could be updated accordingly. There would also be some minor updates to make to the chapter text.

Neither option would be particularly time consuming, but given that it's pretty late in the game (i.e. we're sending a manuscript back to the publisher this week) I'd be inclined to go with option 1. I think not uploading a wheel distribution is consistent with the fact that in this chapter we've stuck to the bare minimum you need to do to distribute a Python package.

I've implemented option 1 in #599