Repository navigation
Closed
Description
We are trying to build xmlsec using this command python3 setup.py install bdist --format=tar
we are getting following error
File "/root/xml_1.3.15/python-xmlsec-1.3.15/setup.py", line 597, in <module>
setup(
File "/usr/local/lib/python3.11/dist-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 148, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 323, in __init__
_Distribution.__init__(self, dist_attrs)
File "/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 309, in __init__
self.finalize_options()
File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 786, in finalize_options
ep(self)
File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 806, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/usr/local/lib/python3.11/dist-packages/setuptools_scm/_integration/setuptools.py", line 103, in version_keyword
_assign_version(dist, config)
File "/usr/local/lib/python3.11/dist-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
_version_missing(config)
File "/usr/local/lib/python3.11/dist-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /root/xml_1.3.15/python-xmlsec-1.3.15.
Following are the steps we used to build the xmlsec
- wget https://github.com/xmlsec/python-xmlsec/archive/refs/tags/1.3.15.tar.gz
- tar -xvf 1.3.15.tar.gz
- cd python-xmlsec-1.3.15/
- python3 setup.py install bdist --format=tar
Following are the output which we got
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
[04/04/25 06:02:46] WARNING toml section missing 'pyproject.toml does not contain a pyproject_reading.py:42
tool.setuptools_scm section'
Traceback (most recent call last):
File
"/usr/local/lib/python3.11/dist-packages/setuptools_scm/_integration/pypr
oject_reading.py", line 36, in read_pyproject
section = defn.get("tool", {})[tool_name]
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'setuptools_scm'
Traceback (most recent call last):
File "/root/xml_1.3.15/python-xmlsec-1.3.15/setup.py", line 597, in <module>
setup(
File "/usr/local/lib/python3.11/dist-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 148, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 323, in __init__
_Distribution.__init__(self, dist_attrs)
File "/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 309, in __init__
self.finalize_options()
File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 786, in finalize_options
ep(self)
File "/usr/local/lib/python3.11/dist-packages/setuptools/dist.py", line 806, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/usr/local/lib/python3.11/dist-packages/setuptools_scm/_integration/setuptools.py", line 103, in version_keyword
_assign_version(dist, config)
File "/usr/local/lib/python3.11/dist-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
_version_missing(config)
File "/usr/local/lib/python3.11/dist-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /root/xml_1.3.15/python-xmlsec-1.3.15.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
Alternatively, set the version with the environment variable SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME} as described in https://setuptools-scm.readthedocs.io/en/latest/config.
NOTE : Above steps were working fine with Master branch when we clone the repo.
Build Machine Details :
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
When can we expect fixed version in 1.3.15 or when will the 1.3.16 tar will be released ?
Reacted by Luke, Gabriel Eisenberg, Noel and Serhii Babak
Metadata
Metadata
Assignees
Labels
No labels
Activity
TomiBelan commentedon Jul 7, 2025
Instead of downloading the tarball from archive/refs/tags/, a) use another tool (pip, uv, ...) to install
xmlsec==1.3.15and let it handle the whole build process, or b) clone this repo with git and checkout the tag you want, or c) download the sdist (tar.gz file) from https://pypi.org/project/xmlsec/, or d) wait for #353.mxamin commentedon Jul 10, 2025
The new release is out which include wheels for common platforms. I guess that should solve this issue for you. Remember that the new version 1.3.16 is only compatible with lxml 6.0.0.
nijel commentedon Aug 6, 2025
The similar error now happened now when installing from pip:
It works now because setuptools-scm 9.x releases were yanked (see pypa/setuptools-scm#1191), but posting here so that you are aware of this as well.
mxamin commentedon Aug 6, 2025
Thanks for the info, I'm aware of that and following the story to see if we need to comply or not. See #366