簡體   English   中英

由於 __init__.pyi 文件,xmlsec 在新版本中被破壞

[英]xmlsec is broken in new version due to __init__.pyi file

我在我的項目中使用xmlsec ,它使用的是最新版本,今天有新版本,它失敗了。

              # .tox/unittest/bin/pip install xmlsec
              Collecting xmlsec
                Using cached xmlsec-1.3.7.tar.gz (59 kB)
                Installing build dependencies ... done
                Getting requirements to build wheel ... done
                Installing backend dependencies ... done
                  Preparing wheel metadata ... done
              Collecting lxml>=3.8
                Using cached lxml-4.5.1-cp37-cp37m-manylinux1_x86_64.whl (5.5 MB)
              Building wheels for collected packages: xmlsec
                Building wheel for xmlsec (PEP 517) ... error
                ERROR: Command errored out with exit status 1:
                 command: /var/lib/jenkins/workspace/cicd-pipeline-myprj-prtest/.tox/unittest/bin/python /var/lib/jenkins/workspace/cicd-pipeline-myprj-prtest/.tox/unittest/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp2y9wnyqo
                     cwd: /tmp/pip-install-4nrsprc3/xmlsec
                Complete output (60 lines):
                running bdist_wheel
                running build
                running build_py
                package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
                creating build
                creating build/lib.linux-x86_64-3.7
                creating build/lib.linux-x86_64-3.7/xmlsec
                copying src/xmlsec/py.typed -> build/lib.linux-x86_64-3.7/xmlsec
                copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-3.7/xmlsec
                copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-3.7/xmlsec
                copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-3.7/xmlsec
                copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-3.7/xmlsec
                running build_ext
                building 'xmlsec' extension
                creating build/temp.linux-x86_64-3.7
                creating build/temp.linux-x86_64-3.7/tmp
                creating build/temp.linux-x86_64-3.7/tmp/pip-install-4nrsprc3
                creating build/temp.linux-x86_64-3.7/tmp/pip-install-4nrsprc3/xmlsec
                creating build/temp.linux-x86_64-3.7/tmp/pip-install-4nrsprc3/xmlsec/src
                gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO=openssl -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.7 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/__pycache__ -I/var/lib/jenkins/workspace/cicd-pipeline-myprj-prtest/.tox/unittest/include -I/var/lib/jenkins/.pyenv/versions/3.7.3/include/python3.7m -c /tmp/pip-install-4nrsprc3/xmlsec/src/enc.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-4nrsprc3/xmlsec/src/enc.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
                /tmp/pip-install-4nrsprc3/xmlsec/src/enc.c: In function ‘PyXmlSec_ClearReplacedNodes’:
                /tmp/pip-install-4nrsprc3/xmlsec/src/enc.c:186:14: warning: assignment from incompatible pointer type [enabled by default]
                         elem = PyXmlSec_elementFactory(doc, n);
                              ^
                gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DXMLSEC_CRYPTO=openssl -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.7 -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/libxml -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/__pycache__ -I/var/lib/jenkins/workspace/cicd-pipeline-myprj-prtest/.tox/unittest/include -I/var/lib/jenkins/.pyenv/versions/3.7.3/include/python3.7m -c /tmp/pip-install-4nrsprc3/xmlsec/src/lxml.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-4nrsprc3/xmlsec/src/lxml.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
                In file included from /tmp/pip-install-4nrsprc3/xmlsec/src/lxml.c:13:0:
                /tmp/pip-build-env-55iapbjz/normal/lib/python3.7/site-packages/lxml/includes/etree_defs.h:266:14: warning: ‘lxml_unpack_xmldoc_capsule’ defined but not used [-Wunused-function]
                 static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned)

當我檢查詳細錯誤時,它是package init file 'src/xmlsec/__init__.py' not found (or not a regular file) 在今天的最新版本中,它已更改為__init__.pyi

https ://github.com/mehcode/python-xmlsec/blob/1.3.7/src/xmlsec/init.pyi

如何處理這個pyi文件?

他們修復了新版本https://github.com/mehcode/python-xmlsec/pull/142

安裝 1.3.8,它應該可以工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM