Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create new Python package for PyPi
# Create environment
mkvirtualenv -p python3 mydjangopackage
pip install django sphinx sphinx-autobuild sphinx-rtd-theme
# Create demo environment
mkvirtualenv -p python3 mydjangopackagedemo
pip install django gunicorn psycopg2 whitenoise dj-database-url
# Create docs
mkdir docs
cd docs/
sphinx-quickstart
# Update docs
(cd docs/ && make html)
sphinx-autobuild docs/ docs/_build_html
# Create package
python setup.py --long-description | rst2html.py > output.html
rm -rf build/
python setup.py sdist bdist_wheel
python setup.py upload (deprecated?)
twine upload dist/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment