Automatically install setuptools-scm in script called from Makefile

This commit is contained in:
Shane McDonald
2022-07-22 12:22:39 -04:00
parent 1bcfc8f28e
commit 0d097964be
6 changed files with 31 additions and 9 deletions

View File

@@ -5,15 +5,16 @@
tasks:
- name: Get version from SCM if not explicitly provided
shell: |
python3 -m setuptools_scm | cut -d + -f -1
make print-VERSION | cut -d + -f -1
args:
chdir: '../../'
register: setup_py_version
register: scm_version
failed_when: not scm_version.stdout
when: awx_version is not defined
- name: Set awx_version
set_fact:
awx_version: "{{ setup_py_version.stdout }}"
awx_version: "{{ scm_version.stdout }}"
when: awx_version is not defined
- include_role:

View File

@@ -43,7 +43,7 @@ RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' && \
xmlsec1-devel \
xmlsec1-openssl-devel
RUN pip3 install virtualenv setuptools_scm build
RUN pip3 install virtualenv build
# Install & build requirements