4. Build distribution files
Make sure that the repo is clean:
git status --ignored
Create and activate a virtual Python environment:
./tools/scripts/create_venv.sh
. venv/bin/activate
Build source and wheel distribution:
python -m build
There should now be two files under the directory `dist/`: `securicad-model-0.0.2.tar.gz` and `securicad_model-0.0.2-py3-none-any.whl`.
5. Publish distribution files
Create `~/.pypirc` with the following content:
[distutils]
index-servers =
securicad-model
securicad-model-test
[securicad-model]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-****
[securicad-model-test]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-****
Publish distribution files to testpypi:
twine upload --repository securicad-model-test dist/*
Publish distribution files to pypi:
twine upload --repository securicad-model dist/*