Skip to content

Instantly share code, notes, and snippets.

@ps-george
Created July 9, 2018 09:21
Show Gist options
  • Save ps-george/714883ea803ceb80606b70751b963d32 to your computer and use it in GitHub Desktop.
Save ps-george/714883ea803ceb80606b70751b963d32 to your computer and use it in GitHub Desktop.
Making a PIP module
  1. Create an account on PyPI
  2. Create ~/.pypirc containing:
[distutils]
index-servers =
  pypi
  pypitest

[pypi]
repository=https://upload.pypi.org/legacy/
username=<username>
password=<password>
  1. Set up directory structure as below:
.
├── package_name ├── __version__.py
├                ├── __init__.py
├── LICENSE
├── MANIFEST.in
├── README.md
├── requirements.txt
└── setup.py
  1. Bootstrap a setup.py file and update package specific variables e.g. from kennethreitz/setup.py
  2. Install twine pip install twine
  3. Run python setup.py upload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment