Skip to content
Tami Takamiya edited this page Dec 12, 2023 · 5 revisions

Build & install ansible-content-parser

  1. Change to a work directory like /var/tmp
  2. Clone the repository
git clone [email protected]:ansible/ansible-content-parser.git
cd ansible-content-parser/
  1. (If needed) switch to a branch
git branch -a
git switch 'branch_name_here'
  1. Make sure python3 > 3.10 and create & activate venv
python3 -V
python3 -m venv venv
source venv/bin/activate
  1. Upgrade pip and install dependencies
pip install --upgrade pip
pip install -e '.[test]'
  1. Reactivate venv
deactivate
source venv/bin/activate
  1. Run tox to build installable images (it also runs unit tests)
tox
  1. Install the .whl file built by tox
pip install dist/ansible_content_parser-xxxxxxx-py3-none-any.whl
  1. Reactivate venv
deactivate
source venv/bin/activate
  1. Run which ansible-content-parser to verify it is installed in the venv
which ansible-content-parser
Clone this wiki locally