mozilla / django-browserid

Django application for adding BrowserID support.
Mozilla Public License 2.0
179 stars 80 forks source link

Provide wheel package on PyPI #293

Closed edmorley closed 8 years ago

edmorley commented 9 years ago

Please could you provide a wheel package on PyPI alongside the standard package? http://pythonwheels.com/

Thanks :-)

peterbe commented 9 years ago

@Osmose how do you do the releases? If you don't already use it, all you need to do is:

$ pip install wheel
$ python setup.py sdist bdist_wheel upload

I would recommend that you let travis run this. That's what I do on all my python projects. For example

Osmose commented 9 years ago

I bumped the version and added a setup.cfg file: https://github.com/mozilla/django-browserid/commit/729e1afee6b94381c5fbbd0b4a00d8da4b225bc9

However, when I published to PyPI it marked the universal wheel as Python 2.7: https://pypi.python.org/pypi/django-browserid/1.0.1/

Any ideas as to why this happened?

Osmose commented 9 years ago

CC @jezdez as he is brilliant and may know why. :D

jezdez commented 9 years ago

@Osmose Don't worry, that's just PyPI being silly, it shows which platform the upload was from when it can't figure out the version from the file name. pip and wheel will take a look at the filename of the wheel file and find it to be matching both platforms, py2 and py3, so all should be good.

BTW, since @peterbe was referring to using the upload subcommand of setup.py, please don't use it. It sends your credentials unencrypted because distutils is stupid. Follow the officially recommended guidelines and use twine instead.

jezdez commented 9 years ago

OOPS, forgot the link to the docs: https://packaging.python.org/en/latest/distributing/#upload-your-distributions

jezdez commented 9 years ago

That's what Travis is using since this summer as well, https://github.com/travis-ci/dpl/commit/8b091fa9ee24bc753cbd5aec24b55e60d0bb33f4

peterbe commented 9 years ago

Wow! That I had no idea about! How disappointing that it does that. Ok. So I'll use python setup.py sdist bdist_wheel and twine upload dist/* instead if I ever do it manually.

But is this safe? I know that stopped working at some point until I added pip install twine.

jezdez commented 9 years ago

@peterbe Yeah, that should be safe, https://github.com/travis-ci/dpl/commit/8b091fa9ee24bc753cbd5aec24b55e60d0bb33f4 made Travis install twine in their virtualenv by default, it's odd that it failed for you. Could you open a ticket in the dpl repo in case you can reproduce it?

peterbe commented 9 years ago

@jezdez I can't reproduce it any more. It was a long time ago. I think the error some simply something like bash: twine: command not found at the very bottom of the travisCI output. When it happened I had never heard of twine and some quick stackoverflow searches said to simply add pip install twine as a prerequisite.

edmorley commented 9 years ago

That's great - thank you :-)

Osmose commented 8 years ago

Closing this, since we have a wheel that apparently works. :D