Skip to content

Commit

Permalink
Allow install the packages on Debian12 (#138)
Browse files Browse the repository at this point in the history
* fix(role_pip): allow use in debian12

* fix(stage1/pip) allow install duplicity
  • Loading branch information
gbloquel authored Jan 11, 2024
1 parent 2c9f881 commit 8ec37bd
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install-requirements: ## Install system dependencies
@echo "—————————————————————————————— SYSTEM REQUIREMENTS ———————————————————————————"
@sudo apt-get install -y \
python3 python3-dev python3-venv python3-pip direnv bash bash-completion \
lsb-release unzip curl sshpass skopeo
lsb-release unzip curl sshpass skopeo librsync-dev
@grep -q 'eval "$$(direnv hook bash)"' ~/.bashrc || \
echo 'eval "$$(direnv hook bash)"' >> ~/.bashrc

Expand Down
3 changes: 3 additions & 0 deletions roles/stage1_pip/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ packages_list:
- cryptography
- dnspython
- passlib
- duplicity

pip_root_folder_external: '/usr/lib/python3.11/EXTERNALLY-MANAGED'
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: 'Ensure not exists {{ pip_root_folder_external }}'
file:
path: '{{ pip_root_folder_external }}'
state: absent

- name: Install Python packages # noqa: command-instead-of-module command-instead-of-shell
shell: >
pip install --no-index --find-links=/var/cache/pip/ {{ packages_list | join(' ') }}
17 changes: 17 additions & 0 deletions roles/stage1_pip/tasks/debian/_prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Download dependencies for duplicity pip packages # noqa: command-instead-of-module
command: >
apt-get install -y --download-only librsync-dev
tags:
- online

- name: Install dependencies for duplicity
ansible.builtin.apt:
name: librsync-dev
state: present

- name: Download python packages # noqa: command-instead-of-module
shell: >
pip wheel --wheel-dir /var/cache/pip {{ packages_list | join(' ') }}
tags:
- online
File renamed without changes.
6 changes: 0 additions & 6 deletions roles/stage1_pip/tasks/debian_11/_prepare.yml

This file was deleted.

0 comments on commit 8ec37bd

Please sign in to comment.