Hi,
I’m having a problem with deploying an app onto an azure web-app service because the deployment action is unable to find the pycario packages
My action is as follows:
name: Build and deploy Python app to Azure Web App - mep-configurator
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Create and start virtual environment
run: |
sudo apt-get update
sudo apt-get install -y libcairo2-dev libjpeg-dev libgif-dev
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: pip install -r requirements.txt
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v2
with:
name: python-app
path: |
.
!venv/
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: python-app
path: .
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-webapp
with:
app-name: 'mep-configurator'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D66086F2554D4C2F9BE23A1323FCFE87 }}
The error I’m getting is:
Building wheels for collected packages: pycairo\n[00:43:51+0000] Building wheel for pycairo
(pyproject.toml): started\n[00:43:53+0000] Building wheel for pycairo (pyproject.toml): finished with
status 'error'\n error: subprocess-exited-with-error\n \n × Building wheel for pycairo (pyproject.toml)
did not run successfully.\n │ exit code: 1\n ╰─> [15 lines of output]\n running bdist_wheel\n
running build\n running build_py\n creating build\n creating build/lib.linux-x86_64-cpython-
310\n creating build/lib.linux-x86_64-cpython-310/cairo\n copying cairo/__init__.py ->
build/lib.linux-x86_64-cpython-310/cairo\n copying cairo/__init__.pyi -> build/lib.linux-x86_64-
cpython-310/cairo\n copying cairo/py.typed -> build/lib.linux-x86_64-cpython-310/cairo\n running
build_ext\n Package cairo was not found in the pkg-config search path.\n Perhaps you should
add the directory containing `cairo.pc'\n to the PKG_CONFIG_PATH environment variable\n No
package 'cairo' found\n Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']'
returned non-zero exit status 1.\n [end of output]\n \n note: This error originates from a
subprocess, and is likely not a problem with pip.\n ERROR: Failed building wheel for
pycairo\n[00:43:53+0000] Failed to build pycairo\nERROR: Could not build wheels for pycairo, which is
required to install pyproject.toml-based projects\n\n[notice] A new release of pip available: 22.2.2 ->
23.1.2\n[notice] To update, run: pip install --upgrade pip
Any help would be welcomed. Thanks