Package with pip3
1pip3 freeze netaddr > requirements.txt
2pip3 download -r requirements.txt -d wheel
3mv requirements.txt wheel
4tar -zcf wheelhouse.tar.gz wheel
5tar -zxf wheelhouse.tar.gz
6pip3 install -r wheel/requirements.txt --no-index --find-links wheel
Package with Poetry
1curl -sSL https://install.python-poetry.org | python3 -
2poetry new rp-poetry
3poetry add ansible
4poetry add poetry
5poetry add netaddr
6poetry add kubernetes
7poetry add jsonpatch
8poetry add `cat ~/.ansible/collections/ansible_collections/kubernetes/core/requirements.txt`
9
10poetry build
11
12pip3 install dist/rp_poetry-0.1.0-py3-none-any.whl
13
14poetry export --without-hashes -f requirements.txt -o requirements.txt
Push dans Nexus
1poetry config repositories.test http://localhost
2poetry publish -r test
Images Builder
1podman login registry.redhat.io
2podman pull registry.redhat.io/ansible-automation-platform-22/ansible-python-base-rhel8:1.0.0-230
3
4pyenv local 3.9.13
5python -m pip install poetry
6poetry init
7poetry add ansible-builder
Comments