由于__init__.pyi文件,XMLSesec在新版本中被破坏



我在我的项目中使用了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,它应该可以工作。

相关内容

  • 没有找到相关文章

最新更新