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

Prepare for wheel distributions #10

Merged
merged 2 commits into from
Apr 6, 2020

Conversation

akx
Copy link
Contributor

@akx akx commented Jan 2, 2020

Hey there,

While setting up a Scrapy-based project, I noticed the source tarball for Protego on PyPI is 3.2 megabytes, due to including all of the test case robots.txt files too. This is, based on the MANIFEST.in file, on purpose:

recursive-include tests *

Some distros (e.g. Debian) do like their upstream source tarballs to include test material, so that's fine.

Those test files don't get included in wheel packages though, bringing the package size to a more reasonable 8 kilobytes. Pip will generally prefer wheels over source distributions so this is an easy way to bring the download size down for everyone.

~/b/protego (prepare-wheel) $ python setup.py sdist bdist_wheel
# ...
~/b/protego (prepare-wheel) $ ls -l dist
total 8256
-rw-r--r--  1 akx  staff     8220 Jan  2 15:53 Protego-0.1.16-py2.py3-none-any.whl
-rw-r--r--  1 akx  staff  3201309 Jan  2 15:56 Protego-0.1.16.tar.gz

This PR adds the required universal = 1 configuration to setup.cfg so the wheel is marked compatible with both Python 2 and Python 3.

However, I'm not sure what the release process here entails; I see some deployment bits in the Travis configuration file, but I don't know what to add there to have the CI pipeline run python setup.py bdist_wheel.

@Gallaecio
Copy link
Member

I don't know what to add [to the Travis CI configuration file] to have the CI pipeline run python setup.py bdist_wheel.

https://docs.travis-ci.com/user/deployment-v2/providers/pypi/#uploading-different-distributions

@akx
Copy link
Contributor Author

akx commented Mar 20, 2020

@Gallaecio Any chance of merging this?

@Gallaecio
Copy link
Member

Policy is to get 2 maintainers to approve. I’ll ping them.

@whalebot-helmsman
Copy link
Collaborator

whalebot-helmsman commented Mar 23, 2020

@akx akx force-pushed the prepare-wheel branch from 8b99ed4 to c30f6a8 Compare April 3, 2020 06:47
@akx
Copy link
Contributor Author

akx commented Apr 3, 2020

Copy link
Collaborator

@whalebot-helmsman whalebot-helmsman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @akx , looks good for me

@whalebot-helmsman whalebot-helmsman merged commit 9bed30b into scrapy:master Apr 6, 2020
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

Successfully merging this pull request may close these issues.

3 participants