Pypi Packaging
Tutorial
https://packaging.python.org/tutorials/packaging-projects/
different and probably obsolete
- missing pyproject.toml
- could that could be used to build local docs?
- READE.rst instead of README.md
- tests directory is lower in structure
- setup.cfg missing metadata
- no mention of release tag moin-2.0.0a8
Be sure that any uncommitted changes are stashed. See issue 1473.
On activated venv, update setuptools and twine.
pip install --upgrade setuptools wheel pip install --upgrade twine pip install --upgrade build
Switch to a release branch, make it current, generate a release tag on release branch
git tag 2.0.0a8
Build the distribution and upload to test.pypi.org. Was able to skip the token stuff under https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
py -m build # copy /translations/*/LX_MESSAGES/translations.mo files py -m twine upload --repository testpypi dist/*
Test Distribution
Create a new venv, install moin, create instance, start server, create item, modify item.
<python> -m venv </path/to/new/virtual/environment> cd </path/to/new/virtual/environment> source bin/activate # scripts\activate pip install --upgrade pip # next command fails with pip 9.0.1 and maybe later versions pip install --pre --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple moin moin create-instance --path <path/to/new/wikiconfig/dir> * path optional, defaults to CWD cd <path/to/new/wikiconfig/dir> # skip if using default CWD moin index-create moin help # prove it works moin --help # prove it works moin run # empty wiki moin load-sample # data but no index moin index-build # data with index