xmlsec / python-xmlsec

Python bindings for the XML Security Library.
MIT License
95 stars 99 forks source link

python2,7 #197

Closed Chumfuchiu closed 2 years ago

Chumfuchiu commented 2 years ago

enviroment: Warning: libxml2 2.9.12 is already installed and up-to-date. To reinstall 2.9.12, run: brew reinstall libxml2 Warning: libxmlsec1 1.2.33 is already installed and up-to-date. To reinstall 1.2.33, run: brew reinstall libxmlsec1 Warning: pkg-config 0.29.2_3 is already installed and up-to-date. To reinstall 0.29.2_3, run: brew reinstall pkg-config

$ brew install libxml2 libxmlsec1 pkg-config $ python2.7 -m pip install xmlsec

but report error:

Requirement already satisfied: lxml>=3.8 in /Users/chumfuchiu/Library/Python/2.7/lib/python/site-packages (from xmlsec) (4.6.4) Building wheels for collected packages: xmlsec Building wheel for xmlsec (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/chumfuchiu/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/tmpcSwfB2 cwd: /private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-install-HO1NdN/xmlsec Complete output (37 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.macosx-11.5-x86_64-2.7 creating build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/py.typed -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/tree.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/init.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/constants.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/template.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec running build_ext building 'xmlsec' extension creating build/temp.macosx-11.5-x86_64-2.7 creating build/temp.macosx-11.5-x86_64-2.7/src cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -iwithsysroot /usr/local/libressl/include -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -D__XMLSEC_FUNCTION=func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.9 -I/usr/local/Cellar/libxmlsec1/1.2.33/include/xmlsec1 -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl@1.1/include/openssl -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes/libxml -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes/libxslt -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes/libexslt -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/constants.c -o build/temp.macosx-11.5-x86_64-2.7/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os src/constants.c:321:5: error: use of undeclared identifier 'xmlSecXkmsNs' PYXMLSEC_ADD_NS_CONSTANT(XkmsNs, "XKMS"); ^ src/constants.c:311:45: note: expanded from macro 'PYXMLSEC_ADD_NS_CONSTANT' tmp = PyString_FromString((const char*)(JOIN(xmlSec, name))); \ ^ src/common.h:19:19: note: expanded from macro 'JOIN'

define JOIN(X,Y) DO_JOIN1(X,Y)

                ^

src/common.h:20:23: note: expanded from macro 'DO_JOIN1'

define DO_JOIN1(X,Y) DO_JOIN2(X,Y)

                    ^

src/common.h:21:23: note: expanded from macro 'DO_JOIN2'

define DO_JOIN2(X,Y) X##Y

                    ^
:6:1: note: expanded from here xmlSecXkmsNs ^ 1 error generated. error: command 'cc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for xmlsec Failed to build xmlsec ERROR: Could not build wheels for xmlsec which use PEP 517 and cannot be installed directly I don't know how to resolve this problem.
Chumfuchiu commented 2 years ago

`Requirement already satisfied: lxml>=3.8 in /Users/chumfuchiu/Library/Python/2.7/lib/python/site-packages (from xmlsec) (4.6.4) Building wheels for collected packages: xmlsec Building wheel for xmlsec (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/chumfuchiu/Library/Python/2.7/lib/python/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/tmpcSwfB2 cwd: /private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-install-HO1NdN/xmlsec Complete output (37 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.macosx-11.5-x86_64-2.7 creating build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/py.typed -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/tree.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/init.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/constants.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec copying src/xmlsec/template.pyi -> build/lib.macosx-11.5-x86_64-2.7/xmlsec running build_ext building 'xmlsec' extension creating build/temp.macosx-11.5-x86_64-2.7 creating build/temp.macosx-11.5-x86_64-2.7/src cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -iwithsysroot /usr/local/libressl/include -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -D__XMLSEC_FUNCTION=func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.9 -I/usr/local/Cellar/libxmlsec1/1.2.33/include/xmlsec1 -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl@1.1/include/openssl -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes/libxml -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes/libxslt -I/private/var/folders/rx/f5p18x3914l8lbd295l2mcbc0000gn/T/pip-build-env-swg6xt/normal/lib/python2.7/site-packages/lxml/includes/libexslt -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/constants.c -o build/temp.macosx-11.5-x86_64-2.7/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os src/constants.c:321:5: error: use of undeclared identifier 'xmlSecXkmsNs' PYXMLSEC_ADD_NS_CONSTANT(XkmsNs, "XKMS"); ^ src/constants.c:311:45: note: expanded from macro 'PYXMLSEC_ADD_NS_CONSTANT' tmp = PyString_FromString((const char*)(JOIN(xmlSec, name))); \ ^ src/common.h:19:19: note: expanded from macro 'JOIN'

define JOIN(X,Y) DO_JOIN1(X,Y)

                ^

src/common.h:20:23: note: expanded from macro 'DO_JOIN1'

define DO_JOIN1(X,Y) DO_JOIN2(X,Y)

                    ^

src/common.h:21:23: note: expanded from macro 'DO_JOIN2'

define DO_JOIN2(X,Y) X##Y

                    ^
:6:1: note: expanded from here xmlSecXkmsNs ^ 1 error generated. error: command 'cc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for xmlsec Failed to build xmlsec ERROR: Could not build wheels for xmlsec which use PEP 517 and cannot be installed directly`
thechip007 commented 2 years ago

Same Error Fed Up of these errors

hoefling commented 2 years ago

@Chumfuchiu unfortunately, python 2.7 was discontinued 2020 and is not supported anymore.