Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues Installing xmlsec==1.3.13 with Python 3.12.7 and Poetry 1.8.5: Missing tool.setuptools_scm Section in pyproject.toml #336

Open
codehia opened this issue Dec 15, 2024 · 1 comment

Comments

@codehia
Copy link

codehia commented Dec 15, 2024

I'm trying to install xmlsec==1.3.13 using Python 3.12.7 and Poetry 1.8.5, but I keep encountering the following warning:

WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'

Has anyone encountered this issue or know how to resolve it? Any suggestions on how to address the missing tool.setuptools_scm section in pyproject.toml would be greatly appreciated!

@narancs93
Copy link

I had the same warning message and I spent some time trying to figure out what is wrong with pyproject.toml or setuptools_scm, but in the end this was not why the installation failed. This is the error I received:

18.34       WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
18.34       Traceback (most recent call last):
18.34         File "/tmp/pip-build-env-hokolzzc/overlay/lib/python3.13/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
18.34           section = defn.get("tool", {})[tool_name]
18.34                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
18.34       KeyError: 'setuptools_scm'
18.34       running bdist_wheel
18.34       running build
18.34       running build_py
18.34       creating build/lib.linux-x86_64-cpython-313/xmlsec
18.34       copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-cpython-313/xmlsec
18.34       copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-cpython-313/xmlsec
18.34       copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-cpython-313/xmlsec
18.34       copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-cpython-313/xmlsec
18.34       copying src/xmlsec/py.typed -> build/lib.linux-x86_64-cpython-313/xmlsec
18.34       running build_ext
18.34       error: Unable to invoke pkg-config.
18.34       [end of output]
18.34   
18.34   note: This error originates from a subprocess, and is likely not a problem with pip.
18.34   ERROR: Failed building wheel for xmlsec

After some time I decided to ignore the pyproject.toml part, and lookup up error: Unable to invoke pkg-config. and I found this issue: #158

I used a Dockerfile and this is where the installation failed:

RUN pip wheel --wheel-dir /usr/src/app/wheels -r ${BUILD_ENVIRONMENT}.txt

I added the suggested command from #158 to reinstall those apt packages before running pip wheel, and after that installation was successful.

RUN apt-get install --no-install-recommends -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl

RUN pip wheel --wheel-dir /usr/src/app/wheels -r ${BUILD_ENVIRONMENT}.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants