Сбой установки python3-saml в AppEngine Python 3.7 Standard - PullRequest
0 голосов
/ 27 октября 2018

У меня есть простая установка в AppEngine Python 3.7 Standard с двумя файлами: requirements.txt и app.yaml.

Файл requirements.txt:

Flask==1.0.2
python3-saml==1.4.1

Файл app.yaml:

runtime: python37
service: myservice

Когда я запустил gcloud app deploy, я получил следующую ошибку:

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build f8eaa62c-0385-4c1a-9788-b7765313ae08 status: FAILURE.
Build error details: {"message": "`pip_download_wheels` had stderr output:\n  Failed building wheel for xmlsec\nERROR: Failed to build one or more wheels\n\nerror: `pip_download_wheels` returned code: 1", "code": 1, "type": "USER_ERROR"}.

Есть идеи, как обойти эту проблему?

Заранее спасибо.

Соответствующая часть из журналов Cloud Build:

Step #1 - "builder": Building wheels for collected packages: itsdangerous, xmlsec, MarkupSafe
Step #1 - "builder":   Running setup.py bdist_wheel for itsdangerous: started
Step #1 - "builder":   Running setup.py bdist_wheel for itsdangerous: finished with status 'done'
Step #1 - "builder":   Stored in directory: /tmp/tmpWitMY2/wheel
Step #1 - "builder":   Running setup.py bdist_wheel for xmlsec: started
Step #1 - "builder":   Running setup.py bdist_wheel for xmlsec: finished with status 'error'
Step #1 - "builder":   Complete output from command /env/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wheel-o2h0m8_p/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-229ft_of:
Step #1 - "builder":   running bdist_wheel
Step #1 - "builder":   running build
Step #1 - "builder":   running build_ext
Step #1 - "builder":   *********************************************************************************
Step #1 - "builder":   Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?
Step #1 - "builder":   *********************************************************************************
Step #1 - "builder":   
Step #1 - "builder":   ----------------------------------------
Step #1 - "builder":   Running setup.py clean for xmlsec
Step #1 - "builder":   Running setup.py bdist_wheel for MarkupSafe: started
Step #1 - "builder":   Running setup.py bdist_wheel for MarkupSafe: finished with status 'done'
Step #1 - "builder":   Stored in directory: /tmp/tmpWitMY2/wheel
Step #1 - "builder": Successfully built itsdangerous MarkupSafe
Step #1 - "builder": Failed to build xmlsec
Step #1 - "builder": 
Step #1 - "builder": INFO     `pip_download_wheels` had stderr output:
Step #1 - "builder":   Failed building wheel for xmlsec
Step #1 - "builder": ERROR: Failed to build one or more wheels
Step #1 - "builder": 
Step #1 - "builder": ERROR    error: `pip_download_wheels` returned code: 1
Step #1 - "builder": INFO     pip_download_wheels took 6 seconds
Step #1 - "builder": INFO     build process for FTL image took 9 seconds
Step #1 - "builder": INFO     full build took 9 seconds
Step #1 - "builder": ERROR    `pip_download_wheels` had stderr output:
Step #1 - "builder":   Failed building wheel for xmlsec
Step #1 - "builder": ERROR: Failed to build one or more wheels
Step #1 - "builder": 
Step #1 - "builder": error: `pip_download_wheels` returned code: 1
Finished Step #1 - "builder"

1 Ответ

0 голосов
/ 30 октября 2018

Пакет python3-saml зависит от xmlsec, что и является причиной сбоя сборки. Этот пакет имеет предустановленные зависимости от библиотек системного уровня , поэтому в журналах содержится следующее сообщение:

Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?

Это невозможночтобы установить эти пакеты системного уровня в стандартной среде AppEngine, вместо этого вам нужно либо использовать пользовательскую среду выполнения с AppEngine Flex , либо использовать замену для python3-saml, которая не зависит от системыпакеты высокого уровня.

...