Last active
July 17, 2017 17:51
-
-
Save richardcornish/ec833827a0612f1c311a02ec4b299612 to your computer and use it in GitHub Desktop.
Create new Python package for PyPi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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