Advertisement
Guest User

Untitled

a guest
Sep 29th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Uploading to PyPI
  2. ================
  3.  
  4. ## Initial things:
  5. 1. Make an account on PyPI
  6.  
  7. 1. Make sure you have `twine` and `wheel` installed in your repo: `pip install twine`
  8.  
  9. 1. Make sure you have your `~/.pypirc` file that looks like this:
  10. ```
  11. [distutils]
  12. index-servers =
  13. pypi
  14.  
  15. [pypi]
  16. username=<INSERT HERE>
  17. password=<INSERT HERE>
  18. ```
  19.  
  20. 1. Change permissions of that file: `chmod 600 ~/.pypirc`
  21.  
  22. 1. Add a `setup.cfg` file that looks like this:
  23. ```
  24. [metadata]
  25. description-file = README.md
  26.  
  27. [wheel]
  28. universal = 1
  29.  
  30. [egg_info]
  31. tag_build =
  32. tag_date = 0
  33. tag_svn_revision = 0
  34. ```
  35.  
  36. 1. In your `setup.py`, make sure you have the following `classifiers`:
  37. ```
  38. classifiers=[
  39. 'Programming Language :: Python',
  40. 'Programming Language :: Python :: 2',
  41. 'Programming Language :: Python :: 2.7',
  42. 'Programming Language :: Python :: 3',
  43. 'Programming Language :: Python :: 3.5',
  44. 'Programming Language :: Python :: 3.6',
  45. ],
  46. ```
  47.  
  48. ## Build and Upload:
  49. 1. Tag branch: `git tag <VERSION> -m "Version blah blah blah..."` and then upload: `git push --tags REMOTE`
  50.  
  51. 1. Build it: `python setup.py sdist bdist_wheel --universal`
  52.  
  53. 1. Then upload: `twine upload dist/*`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement