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

Provide wheel distribution on PyPI #10

Closed
edmorley opened this issue Jul 19, 2017 · 4 comments
Closed

Provide wheel distribution on PyPI #10

edmorley opened this issue Jul 19, 2017 · 4 comments

Comments

@edmorley
Copy link

edmorley commented Jul 19, 2017

Hi!

Please could this package also by made available as a wheel on PyPI?
https://pypi.python.org/pypi/graphql-relay/0.4.5

Wheels have the following advantages:

  • Faster installation time
  • Allows the wheel cache to work even when using the new pip hash-checking mode
  • Allows tools to statically inspect the package metadata without having to execute untrusted code.
  • ...and more - see: http://pythonwheels.com

This package is pure Python and supports both Python 2 and 3, so can be distributed as a "universal wheel":
https://packaging.python.org/tutorials/distributing-packages/#wheels

To save having to pass --universal to setup.py each time, the pref can be saved in setup.cfg:

[bdist_wheel]
universal=1

The Python packaging guide recommends using Twine to upload packages:
https://packaging.python.org/tutorials/distributing-packages/#uploading-your-project-to-pypi

So with the setup.cfg as above, the steps for building/uploading a new release are then:

$ pip install -U twine setuptools wheel
$ rm -rf dist/ build/
$ python setup.py sdist bdist_wheel
$ twine upload dist/*

The PyPI package listing will then display two entries for the new release, one with type "Source" and the other "Python Wheel".

Many thanks :-)

@edmorley
Copy link
Author

edmorley commented Aug 7, 2017

I'm happy to open a PR for this, but would you prefer:

  1. A new section in the README with publishing steps
  2. A PyPI deploy entry in .travis.yml, similar to what graphene-django does (here)
  3. A setup.py publish command (similar to what a few other packages do)
  4. Just the setup.cfg universal wheel entry, and the rest left as something for maintainers to remember whenever they perform a new release?

Cheers :-)

@syrusakbary
Copy link
Member

2 and 4 should be enough :)
(If you wanna still work on 1 and 3 I will still merge!)

@edmorley
Copy link
Author

Sorry for my delayed reply!

2+4 sounds like the best approach, though the Travis encrypted variables are repo-specific, so I won't be able to copy-paste them from graphene-django, someone with repository access will need to do so.

@Cito
Copy link
Member

Cito commented Dec 30, 2019

The last version in all three branches v0.5.0, v2.0.1, v3.0.0 are now available as wheels, and future versions will be automatically deployed as wheels, too.

@Cito Cito closed this as completed Dec 30, 2019
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

3 participants