This document contains instructions to publish pydgraph to PyPI.
- Get access to credentials for Dgraph's account on PyPI with username dgraph-io
- Setup you
~/.pypircfile like this: (remember to replace${password}with the actual password)
[distutils]
index-servers=
pypi
testpypi
[pypi]
username: dgraph-io
password: ${password}
[testpypi]
repository: https://test.pypi.org/legacy/
username: dgraph-io
password: ${password}
- Build and test the code that needs to be published
- Bump version by modifying the
VERSIONvariable inpydgraph/meta.pyfile - If necessary, update the
CHANGELOG.mdfile to reflect new changes - Commit the changes
- Make sure you have setuptools, wheel, twine, and pypandoc installed
- Run the following commands:
# Remove build and dist directories
rm -rf build
rm -rf dist
# Package you project: source distribution and wheel
python setup.py sdist
python setup.py bdist_wheel
# Upload it to PyPI
twine upload dist/*
# For testing, try uploading to testpypi:
# twine upload --repository testpypi dist/*- If necessary, create a new release tag on the Github repository