Closed edmorley closed 8 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
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?
CC @jezdez as he is brilliant and may know why. :D
@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.
OOPS, forgot the link to the docs: https://packaging.python.org/en/latest/distributing/#upload-your-distributions
That's what Travis is using since this summer as well, https://github.com/travis-ci/dpl/commit/8b091fa9ee24bc753cbd5aec24b55e60d0bb33f4
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
.
@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?
@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.
That's great - thank you :-)
Closing this, since we have a wheel that apparently works. :D
Please could you provide a wheel package on PyPI alongside the standard package? http://pythonwheels.com/
Thanks :-)