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-aws-collector-0.0.2.tar.gz` and `securicad_aws_collector-0.0.2-py3-none-any.whl`.
5. Publish distribution files
Create `~/.pypirc` with the following content:
[distutils]
index-servers =
securicad-aws-collector
securicad-aws-collector-test
[securicad-aws-collector]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-****
[securicad-aws-collector-test]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-****
Publish distribution files to testpypi:
twine upload --repository securicad-aws-collector-test dist/*
Publish distribution files to pypi:
twine upload --repository securicad-aws-collector dist/*