Skip to content

Commit

Permalink
use requirements-saltbox.txt for pip depdendencies
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Apr 9, 2024
1 parent 00a5e8a commit f8b26ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions sb.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,6 @@ def manage_ansible_venv(recreate=False):
print("Update script failed.")
sys.exit(result.returncode)

# Install pip and required packages
subprocess.run([f"{ansible_venv_path}/venv/bin/pip", "install", "-U", "pip"])
required_packages = ["tld", "argon2_cffi", "ndg-httpsclient", "dnspython", "lxml", "jmespath", "passlib", "PyMySQL",
"docker", "pyOpenSSL", "requests", "netaddr", "jinja2"]
subprocess.run([f"{ansible_venv_path}/venv/bin/pip", "install"] + required_packages)

# Change ownership of the ansible directory
subprocess.run(["chown", "-R", f"{SALTBOX_USER}:{SALTBOX_USER}", ansible_venv_path])

Expand Down
8 changes: 1 addition & 7 deletions sb_dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ run_cmd apt-get install -y \
python3-dev \
python3-testresources \
python3-apt \
python3-virtualenv \
python3-venv \
|| error "Failed to install apt dependencies"

Expand Down Expand Up @@ -195,12 +194,7 @@ run_cmd $PYTHON3_CMD \
pip setuptools wheel \
|| error "Failed to install pip setuptools and wheel with $PYTHON3_CMD"
run_cmd $PYTHON3_CMD \
pyOpenSSL requests netaddr \
jmespath jinja2 docker \
ruamel.yaml tld argon2_cffi \
ndg-httpsclient dnspython lxml \
jmespath passlib PyMySQL \
ansible$ANSIBLE ansible-lint \
--requirements /srv/git/sb/requirements-saltbox.txt \
|| error "Failed to install pip3 dependencies with $PYTHON3_CMD"

run_cmd cp /srv/ansible/venv/bin/ansible* /usr/local/bin/ \
Expand Down

0 comments on commit f8b26ea

Please sign in to comment.