Closed markp2 closed 2 years ago
Can't reproduce that:
$ pip download --no-cache-dir xmlsec
$ tar xfO xmlsec-1.3.13.tar.gz xmlsec-1.3.13/PKG-INFO | grep -i 'version:'
Metadata-Version: 2.1
Version: 1.3.13
$ tar xfO xmlsec-1.3.13.tar.gz xmlsec-1.3.13/src/xmlsec.egg-info/PKG-INFO | grep -i 'version:'
Metadata-Version: 2.1
Version: 1.3.13
What version of pip
are you using? Try upgrading pip
(and by chance setuptools
as well) first:
$ python3 -m venv tst
$ source tst/bin/activate
(tst) $ pip install --upgrade pip setuptools
...
Successfully installed pip-22.2.2 setuptools-65.3.0
(tst) $ pip install xmlsec
Does the error still persist?
Thanks. I only have pip3 and it is 22.2.2
mark@MarksMacBookM1 source % pip3 --version
pip 22.2.2 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)
mark@MarksMacBookM1 source % setuptools --version
zsh: command not found: setuptools
Again - does it fail in a fresh venv? Use the commands given at the bottom of my previous comment to reproduce.
That does work:
mark@MarksMacBookM1 source % python3 -m venv tst
mark@MarksMacBookM1 source % source tst/bin/activate
(tst) mark@MarksMacBookM1 source % pip install --upgrade pip setuptools
Requirement already satisfied: pip in ./tst/lib/python3.10/site-packages (22.2.2)
Requirement already satisfied: setuptools in ./tst/lib/python3.10/site-packages (63.4.3)
Collecting setuptools
Using cached setuptools-65.3.0-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 63.4.3
Uninstalling setuptools-63.4.3:
Successfully uninstalled setuptools-63.4.3
Successfully installed setuptools-65.3.0
(tst) mark@MarksMacBookM1 source % pip install xmlsec
Collecting xmlsec
Downloading xmlsec-1.3.13.tar.gz (64 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.6/64.6 kB 1.9 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting lxml>=3.8
Using cached lxml-4.9.1-cp310-cp310-macosx_12_0_arm64.whl
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (pyproject.toml) ... done
Created wheel for xmlsec: filename=xmlsec-1.3.13-cp310-cp310-macosx_12_0_arm64.whl size=44989 sha256=edab7c228248f9f5aab14ac81f4684670f9295979ff7cb46b7604288d944526b
Stored in directory: /Users/mark/Library/Caches/pip/wheels/4e/10/4f/db7ab2326b7ed5575ca8d5896571220217048e11c899e8f35f
Successfully built xmlsec
Installing collected packages: lxml, xmlsec
Successfully installed lxml-4.9.1 xmlsec-1.3.13
(tst) mark@MarksMacBookM1 source %
This isn't an issue with the package itself then, rather with the brewed environment - update pip
/setuptools
for the brewed python and you should be good.
I am getting pip install failures - apparently because the 1.3.13.tar.gz has inconsistent version: filename has '1.3.13', but metadata has '0.0.0'. This has the effect of continuing 1.3.13. -> 1.3.12 -> 1.3.11 etc. until it ultimately fails. See below.
A workaround is to use Pips legacy resolver
sudo -H pip3 install --use-deprecated=legacy-resolver -U xmlsec
mark@MarksMacBookM1 source % sudo -H pip3 install -U --no-cache-dir xmlsec Requirement already satisfied: xmlsec in /opt/homebrew/lib/python3.10/site-packages (0.0.0) Collecting xmlsec Downloading xmlsec-1.3.13.tar.gz (64 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.6/64.6 kB 7.3 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Discarding https://files.pythonhosted.org/packages/37/9f/342d4562eac99178d0d515c780285e107c6828cefad37d02f05b7b7d8751/xmlsec-1.3.13.tar.gz (from https://pypi.org/simple/xmlsec/) (requires-python:>=3.5): Requested xmlsec from https://files.pythonhosted.org/packages/37/9f/342d4562eac99178d0d515c780285e107c6828cefad37d02f05b7b7d8751/xmlsec-1.3.13.tar.gz has inconsistent version: filename has '1.3.13', but metadata has '0.0.0' Downloading xmlsec-1.3.12.tar.gz (64 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.2/64.2 kB 344.0 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Discarding https://files.pythonhosted.org/packages/70/d7/83ac0d43bb92333c8ba3d9be97b85d1b2856ff9f32cebfc87b0e733339cc/xmlsec-1.3.12.tar.gz (from https://pypi.org/simple/xmlsec/) (requires-python:>=3.5): Requested xmlsec from https://files.pythonhosted.org/packages/70/d7/83ac0d43bb92333c8ba3d9be97b85d1b2856ff9f32cebfc87b0e733339cc/xmlsec-1.3.12.tar.gz has inconsistent version: filename has '1.3.12', but metadata has '0.0.0' Downloading xmlsec-1.3.11.tar.gz (61 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.3/61.3 kB 97.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Discarding https://files.pythonhosted.org/packages/ff/dd/0893ae620bfe3537eaa91c3a24e70dceba616b0cc71ed8e9fe9d0289fe34/xmlsec-1.3.11.tar.gz (from https://pypi.org/simple/xmlsec/) (requires-python:>=3.5): Requested xmlsec from https://files.pythonhosted.org/packages/ff/dd/0893ae620bfe3537eaa91c3a24e70dceba616b0cc71ed8e9fe9d0289fe34/xmlsec-1.3.11.tar.gz has inconsistent version: filename has '1.3.11', but metadata has '0.0.0' Downloading xmlsec-1.3.10.tar.gz (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.3/62.3 kB 2.9 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Discarding https://files.pythonhosted.org/packages/ca/a0/0b6f01fa1f138276e776dc31f1627be795a93e2722066db037444d956ee0/xmlsec-1.3.10.tar.gz (from https://pypi.org/simple/xmlsec/) (requires-python:>=3.5): Requested xmlsec from https://files.pythonhosted.org/packages/ca/a0/0b6f01fa1f138276e776dc31f1627be795a93e2722066db037444d956ee0/xmlsec-1.3.10.tar.gz has inconsistent version: filename has '1.3.10', but metadata has '0.0.0' Downloading xmlsec-1.3.9.tar.gz (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 8.1 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Discarding https://files.pythonhosted.org/packages/47/61/b466ff0c8aa87ff033de8349d5f56d44336b67a77c092d3162a5f9e35ee8/xmlsec-1.3.9.tar.gz (from https://pypi.org/simple/xmlsec/) (requires-python:>=2.7, !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.): Requested xmlsec from https://files.pythonhosted.org/packages/47/61/b466ff0c8aa87ff033de8349d5f56d44336b67a77c092d3162a5f9e35ee8/xmlsec-1.3.9.tar.gz has inconsistent version: filename has '1.3.9', but metadata has '0.0.0' Downloading xmlsec-1.3.8.tar.gz (59 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.4/59.4 kB 14.7 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Discarding https://files.pythonhosted.org/packages/c3/e5/3e3183715fb3f98bd1ad44a7cc4a278bfeb800b9e9c2d50fe15f8522e548/xmlsec-1.3.8.tar.gz (from https://pypi.org/simple/xmlsec/) (requires-python:>=2.7, !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.): Requested xmlsec from https://files.pythonhosted.org/packages/c3/e5/3e3183715fb3f98bd1ad44a7cc4a278bfeb800b9e9c2d50fe15f8522e548/xmlsec-1.3.8.tar.gz has inconsistent version: filename has '1.3.8', but metadata has '0.0.0' Downloading xmlsec-1.3.3.tar.gz (29 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: pkgconfig in /opt/homebrew/lib/python3.10/site-packages (from xmlsec) (1.5.5) Requirement already satisfied: lxml>=3.0 in /opt/homebrew/lib/python3.10/site-packages (from xmlsec) (4.9.1) Building wheels for collected packages: xmlsec Building wheel for xmlsec (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [38 lines of output] /opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( /opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead warnings.warn( /opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead warnings.warn( running bdist_wheel running build running build_ext building 'xmlsec' extension creating build creating build/temp.macosx-12-arm64-cpython-310 creating build/temp.macosx-12-arm64-cpython-310/private creating build/temp.macosx-12-arm64-cpython-310/private/tmp creating build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v creating build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b creating build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.3 -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 -I/opt/homebrew/Cellar/libxmlsec1/1.2.34_1/include/xmlsec1 -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/openssl@1.1/include/openssl -I/opt/homebrew/lib/python3.10/site-packages/lxml/includes -I/opt/homebrew/lib/python3.10/site-packages/lxml -I/opt/homebrew/lib/python3.10/site-packages/lxml/includes/pycache__ -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.c -o build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.o -g -std=c99 -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.c:288:5: error: use of undeclared identifier 'xmlSecXkmsNs' PYXMLSEC_ADD_NS_CONSTANT(XkmsNs, "XKMS"); ^ /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.c:278:45: note: expanded from macro 'PYXMLSEC_ADD_NS_CONSTANT' tmp = PyString_FromString((const char*)(JOIN(xmlSec, name))); \ ^ /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/common.h:19:19: note: expanded from macro 'JOIN'
define JOIN(X,Y) DO_JOIN1(X,Y)
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for xmlsec Running setup.py clean for xmlsec Failed to build xmlsec Installing collected packages: xmlsec Attempting uninstall: xmlsec Found existing installation: xmlsec 0.0.0 Uninstalling xmlsec-0.0.0: Successfully uninstalled xmlsec-0.0.0 Running setup.py install for xmlsec ... error error: subprocess-exited-with-error
× Running setup.py install for xmlsec did not run successfully. │ exit code: 1 ╰─> [40 lines of output] /opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( /opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead warnings.warn( /opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead warnings.warn( running install /opt/homebrew/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_ext building 'xmlsec' extension creating build creating build/temp.macosx-12-arm64-cpython-310 creating build/temp.macosx-12-arm64-cpython-310/private creating build/temp.macosx-12-arm64-cpython-310/private/tmp creating build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v creating build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b creating build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DMODULE_NAME=xmlsec -DMODULE_VERSION=1.3.3 -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 -I/opt/homebrew/Cellar/libxmlsec1/1.2.34_1/include/xmlsec1 -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/openssl@1.1/include/openssl -I/opt/homebrew/lib/python3.10/site-packages/lxml/includes -I/opt/homebrew/lib/python3.10/site-packages/lxml -I/opt/homebrew/lib/python3.10/site-packages/lxml/includes/pycache__ -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.c -o build/temp.macosx-12-arm64-cpython-310/private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.o -g -std=c99 -fno-strict-aliasing -Wno-error=declaration-after-statement -Werror=implicit-function-declaration -Os /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.c:288:5: error: use of undeclared identifier 'xmlSecXkmsNs' PYXMLSEC_ADD_NS_CONSTANT(XkmsNs, "XKMS"); ^ /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/constants.c:278:45: note: expanded from macro 'PYXMLSEC_ADD_NS_CONSTANT' tmp = PyString_FromString((const char*)(JOIN(xmlSec, name))); \ ^ /private/tmp/pip-install-nc4uyq5v/xmlsec_48cb4d05ce334f9090a534f5a83c437b/src/common.h:19:19: note: expanded from macro 'JOIN'
define JOIN(X,Y) DO_JOIN1(X,Y)
note: This error originates from a subprocess, and is likely not a problem with pip. Rolling back uninstall of xmlsec Moving to /opt/homebrew/lib/python3.10/site-packages/xmlsec-0.0.0.dist-info/ from /opt/homebrew/lib/python3.10/site-packages/~mlsec-0.0.0.dist-info Moving to /opt/homebrew/lib/python3.10/site-packages/xmlsec.cpython-310-darwin.so from /private/tmp/pip-uninstall-b9aut885/xmlsec.cpython-310-darwin.so Moving to /opt/homebrew/lib/python3.10/site-packages/xmlsec/ from /opt/homebrew/lib/python3.10/site-packages/~mlsec error: legacy-install-failure
× Encountered error while trying to install package. ╰─> xmlsec
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. mark@MarksMacBookM1 source %