- https://packaging.python.org/distributing/#upload-your-distributions
- http://peterdowns.com/posts/first-time-with-pypi.html
First you may want to test a local install and test it:
python setup.py install
py.test
Then,
- Copy .pypirc file from backup (if required, as it's not synced to git)
- Test it:
python setup.py sdist upload -r pypitest
- Run it live:
pandoc README.md --output=README.rst && python setup.py sdist upload -r pypi
To run and update docs and website, run:
cd docs && make.bat html && cd .. && cd ../website && jekyll build && s3_website push && cd ../panflute
To build the pdf version (slow), install miktex or similar and run:
cd docs && make.bat latex && cd build && cd latex && Makefile && cd
(On Windows, replace Makefile
with a few runs of pdflatex Panflute.tex
)
Then copy the resulting PDF into the Panflute folder of the website.
To run unit tests locally and check code coverage, run:
pytest --cov=panflute tests && coverage html && cd htmlcov && index.html && cd ..
This requires a development environment, which can be installed from the repository's root directory using:
pip install --editable ".[dev]"
First, ensure that you have twine
installed and the checks pass:
cls && python setup.py sdist && twine check dist/*
Then try the test PyPI repository:
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose
Finally update to the official repo:
twine upload dist/*
Solution: ensure that files have Unix line endings (not Windows)