diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 54a12a6..5aeb9be 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -32,7 +32,7 @@ on: commontoolingBranch: description: 'Commontooling branch or tag to use' required: true - default: 'main' + default: 'philipn-python-install-setuptools' type: string jobs: @@ -48,5 +48,5 @@ jobs: # workflow_dispatch inputs are always strings. Convert to boolean. forceDocsUpload: ${{ inputs.forceDocsUpload == true }} pythonVersion: ${{ inputs.pythonVersion || '3.10' }} - commontoolingBranch: ${{ inputs.commontoolingBranch || 'main' }} + commontoolingBranch: ${{ inputs.commontoolingBranch || 'philipn-python-install-setuptools' }} secrets: inherit diff --git a/static-commontooling/docker/Dockerfile_multi_macros.j2 b/static-commontooling/docker/Dockerfile_multi_macros.j2 index 9fd3eb7..754f2ab 100644 --- a/static-commontooling/docker/Dockerfile_multi_macros.j2 +++ b/static-commontooling/docker/Dockerfile_multi_macros.j2 @@ -27,6 +27,8 @@ COPY --from=api /api ./{{ modname }}/apidocs {% endif -%} COPY . . +RUN --mount=type=cache,target=/root/.cache/pip --mount=type=secret,id=pipconf,target=/etc/pip.conf pip install setuptools + RUN python3 setup.py sdist {%- endmacro %} @@ -66,6 +68,9 @@ COPY {{ extra_requirements_file }} ./ RUN cat {{ extra_requirements_file }} >> ./requirements.txt {%- endif %} +# Ensure setuptools is installed +RUN --mount=type=cache,target=/root/.cache/pip --mount=type=secret,id=pipconf,target=/etc/pip.conf pip install setuptools + {% if install_target != None -%} RUN --mount=type=cache,target=/root/.cache/pip --mount=type=secret,id=pipconf,target=/etc/pip.conf mkdir -p {{ install_target }} && pip install -f ./wheels -r requirements.txt -t {{ install_target }}