xmlsec / python-xmlsec

Python bindings for the XML Security Library.
MIT License
94 stars 97 forks source link

Unable to install xmlsec: xmlSecTransformXsltId undeclared #172

Closed waranlogesh closed 3 years ago

waranlogesh commented 3 years ago

Version of xmlsec - 1.3.10

Version of libxmlsec1

libxmlsec1-dev/focal,now 1.2.28-2 amd64 [installed]
libxmlsec1-doc/focal 1.2.28-2 all
libxmlsec1-gcrypt/focal,now 1.2.28-2 amd64 [installed,automatic]
libxmlsec1-gnutls/focal,now 1.2.28-2 amd64 [installed,automatic]
libxmlsec1-nss/focal,now 1.2.28-2 amd64 [installed,automatic]
libxmlsec1-openssl/focal,now 1.2.28-2 amd64 [installed]
libxmlsec1/focal,now 1.2.28-2 amd64 [installed]

Version of libxml2

libxml2-dev/focal,now 2.9.10+dfsg-5 amd64 [installed]
libxml2-doc/focal 2.9.10+dfsg-5 all
libxml2-utils/focal 2.9.10+dfsg-5 amd64
libxml2/focal,now 2.9.10+dfsg-5 amd64 [installed,automatic]
python-libxml2-dbg/focal 2.9.10+dfsg-5 amd64
python-libxml2/focal 2.9.10+dfsg-5 amd64
python3-libxml2-dbg/focal 2.9.10+dfsg-5 amd64
python3-libxml2/focal 2.9.10+dfsg-5 amd64

Output from the command pkg-config --cflags xmlsec1

-D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO_OPENSSL=1 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2

pip error log

❯ pip install xmlsec
Collecting xmlsec
  Using cached xmlsec-1.3.10.tar.gz (62 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: lxml>=3.8 in ./.venv/lib/python3.6/site-packages (from xmlsec) (4.6.3)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/logesh/workspace/sentry/.venv/bin/python /home/logesh/workspace/sentry/.venv/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp4whsoa6o
       cwd: /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b
  Complete output (61 lines):
  running bdist_wheel
  running build
  running build_py
  /tmp/pip-build-env-_cc7wa16/overlay/lib/python3.6/site-packages/setuptools/dist.py:651: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    % (opt, underscore_opt))
  /tmp/pip-build-env-_cc7wa16/overlay/lib/python3.6/site-packages/setuptools/dist.py:651: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
    % (opt, underscore_opt))
  /tmp/pip-build-env-_cc7wa16/overlay/lib/python3.6/site-packages/setuptools/dist.py:651: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
    % (opt, underscore_opt))
  package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/py.typed -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-3.6/xmlsec
  running build_ext
  building 'xmlsec' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/tmp
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/ds.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/ds.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c: In function ‘PyXmlSec_KeyNameSet’:
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c:456:43: warning: passing argument 2 of ‘xmlSecKeySetName’ from incompatible pointer type [-Wincompatible-pointer-types]
    456 |         if (xmlSecKeySetName(key->handle, value) < 0) {
        |                                           ^~~~~
        |                                           |
        |                                           PyObject * {aka struct _object *}
  In file included from /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1/xmlsec/openssl/app.h:16,
                   from /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1/xmlsec/crypto.h:28,
                   from /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.h:16,
                   from /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/keys.c:11:
  /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1/xmlsec/keys.h:195:73: note: expected ‘const xmlChar *’ {aka ‘const unsigned char *’} but argument is of type ‘PyObject *’ {aka ‘struct _object *’}
    195 |                                                          const xmlChar* name);
        |                                                          ~~~~~~~~~~~~~~~^~~~
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/lxml.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/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-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/lxml.c:13:
  /tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/etree_defs.h:266:14: warning: ‘lxml_unpack_xmldoc_capsule’ defined but not used [-Wunused-function]
    266 | static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned) {
        |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/template.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/template.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/linuxbrew/.linuxbrew/opt/guile@2/include -fPIC -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_XSLT=1 -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.10 -I/home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/1.2.32/include/xmlsec1 -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include -I/home/linuxbrew/.linuxbrew/opt/openssl@1.1/include/openssl -I/home/linuxbrew/.linuxbrew/Cellar/libxml2/2.9.10_2/include/libxml2 -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/__pycache__ -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libexslt -I/tmp/pip-build-env-_cc7wa16/normal/lib/python3.6/site-packages/lxml/includes/libxml -I/home/logesh/workspace/sentry/.venv/include -I/home/logesh/.pyenv/versions/3.6.10/include/python3.6m -c /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.o -g -std=c99 -fPIC -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c: In function ‘PyXmlSec_ConstantsModule_Init’:
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:469:33: error: ‘xmlSecTransformXsltId’ undeclared (first use in this function); did you mean ‘xmlSecTransformXPathId’?
    469 |     tmp = PyXmlSec_TransformNew(xmlSec ## name ## Id); \
        |                                 ^~~~~~
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:488:5: note: in expansion of macro ‘PYXMLSEC_ADD_TRANSFORM_CONSTANT’
    488 |     PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformXslt, "XSLT");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:469:33: note: each undeclared identifier is reported only once for each function it appears in
    469 |     tmp = PyXmlSec_TransformNew(xmlSec ## name ## Id); \
        |                                 ^~~~~~
  /tmp/pip-install-hmlzclp9/xmlsec_b947c37750264afd8d652ca1fd9b610b/src/constants.c:488:5: note: in expansion of macro ‘PYXMLSEC_ADD_TRANSFORM_CONSTANT’
    488 |     PYXMLSEC_ADD_TRANSFORM_CONSTANT(TransformXslt, "XSLT");
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  error: command 'gcc' 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
aalvrz commented 3 years ago

Also experiencing this error when installing for Python 3.8 on AMI:

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
hoefling commented 3 years ago

@waranlogesh I suppose you have multiple installations of libxmlsec1: one via apt, version 1.2.28 and one via linuxbrew, version 1.2.32. pkg-config shows flags for the lib version installed via apt, while the 1.2.32 installed into /home/linuxbrew/.linuxbrew/Cellar/libxmlsec1/ is used for building. Using the version installed via apt, the installation runs fine here:

$ docker run --rm -it ubuntu:20.04
# apt update && apt full-upgrade -y
# apt install libxml2-dev libxmlsec1-dev libxmlsec1-openssl python3-dev python3-pip python3-venv build-essential pkg-config
# python3 -m venv test
# source test/bin/activate
# pip install xmlsec
Collecting xmlsec
  Using cached xmlsec-1.3.10.tar.gz (62 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.6.3-cp38-cp38-manylinux2014_x86_64.whl (6.8 MB)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (PEP 517) ... done
  Created wheel for xmlsec: filename=xmlsec-1.3.10-cp38-cp38-linux_x86_64.whl size=196004 sha256=642296850f73c804542bb9ad3cfc0289fd37c23f431804cbc231a2acfce179e2
  Stored in directory: /root/.cache/pip/wheels/39/89/be/839edc5b5c73c980be0a9093d0e5df9681848b92e2541b9b25
Successfully built xmlsec
Installing collected packages: lxml, xmlsec
Successfully installed lxml-4.6.3 xmlsec-1.3.10
waranlogesh commented 3 years ago

@hoefling Thanks for the response. I was able to install using libxmlsec1 from apt.

Is there any way we can have compatibility with the homebrew version?

hoefling commented 3 years ago

@waranlogesh I don't know how linuxbrew builds the libraries and honestly don't have time to look into it, but at least xmlsec1 build looks broken to me. To reproduce your error from above:

$ docker run --rm -it linuxbrew/brew:latest
# su linuxbrew
$ export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
$ brew update
$ brew install python gcc libxml2 libxmlsec1 pkg-config
$ gcc-11 $(pkg-config --cflags xmlsec1) $(pkg-config --libs xmlsec1) tst.c -o tst
tst.c: In function 'main':
tst.c:4:16: error: 'xmlSecTransformXsltId' undeclared (first use in this function); did you mean 'xmlSecTransformXPathId'?
    4 |   printf("%s", xmlSecTransformXsltId);
      |                ^~~~~~~~~~~~~~~~~~~~~
      |                xmlSecTransformXPathId
tst.c:4:16: note: each undeclared identifier is reported only once for each function it appears in

with tst.c being simply

#include <xmlsec/transforms.h>

int main() {
  printf("test: %p\n", xmlSecTransformXsltId);
  return 0;
}

This indicates xmlSecTransformXsltId is not available, thus it isn't possible to build the bindings. Most likely a misconfigured library build in the first place. This isn't the case if I build the lib in e.g. a fedora:rawhide container, using xmlsec1.spec with version number patched to 1.2.32. You can report the issue upstream if you wish; I will leave this issue open for now anyway.

hoefling commented 3 years ago

@waranlogesh after I got some sleep - actually it's because the libxmlsec1 is built without XSLT support, and xmlsec code doesn't distinct between both variants. I will add compile-time checks for XMLSEC_NO_XSLT and disable the relevant functionality. Good catch!

waranlogesh commented 3 years ago

Thank you @hoefling

hoefling commented 3 years ago

@waranlogesh this should be fixed in #173. If you want, you can test by installing from the PR:

$ pip install git+https://github.com/mehcode/python-xmlsec.git@refs/pull/173/merge
waranlogesh commented 3 years ago

@waranlogesh this should be fixed in #173. If you want, you can test by installing from the PR:

$ pip install git+https://github.com/mehcode/python-xmlsec.git@refs/pull/173/merge

Great. This works.

❯ pip install git+https://github.com/mehcode/python-xmlsec.git@refs/pull/173/merge

Collecting git+https://github.com/mehcode/python-xmlsec.git@refs/pull/173/merge
  Cloning https://github.com/mehcode/python-xmlsec.git (to revision refs/pull/173/merge) to /tmp/pip-req-build-y9iofssx
  Running command git clone -q https://github.com/mehcode/python-xmlsec.git /tmp/pip-req-build-y9iofssx
  WARNING: Did not find branch or tag 'refs/pull/173/merge', assuming revision or ref.
  Running command git fetch -q https://github.com/mehcode/python-xmlsec.git refs/pull/173/merge
  Running command git checkout -q 892d33497fcac7f27cc2da67e5399c4902bcd576
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: lxml>=3.8 in ./.venv/lib/python3.6/site-packages (from xmlsec==1.3.11.dev6+g892d334) (4.6.3)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (PEP 517) ... done
  Created wheel for xmlsec: filename=xmlsec-1.3.11.dev6+g892d334-cp36-cp36m-linux_x86_64.whl size=184997 sha256=392f1258f88d14e6313444612a76ef8b9d8515ce88545638f932e61dc73dd312
  Stored in directory: /tmp/pip-ephem-wheel-cache-ey3w4ecu/wheels/c1/71/ce/99d7d4709ebeaeb531bf298d24bbe321adf8b23ecdf23e58ee
Successfully built xmlsec
Installing collected packages: xmlsec
Successfully installed xmlsec-1.3.11.dev6+g892d334
hoefling commented 3 years ago

@waranlogesh awesome, thank you for testing!