setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

LookupError: pyproject.toml does not contain a tool.setuptools_scm section

Open ThomasWaldmann opened this issue 2 years ago • 6 comments
trafficstars

Just seen that with borgbackup 1.2-maint branch - this used to work since recently.

(borg-env) tw@mba2020 borg % python setup.py clean clean2
Detected OpenSSL [via pkg-config]
Detected and preferring liblz4 [via pkg-config]
Detected and preferring libzstd [via pkg-config]
Detected and preferring libxxhash [via pkg-config]
/Users/tw/w/borg-env/lib/python3.11/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        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)
[09/25/23 14:00:36] ERROR    pyproject.toml does not contain a tool.setuptools_scm section                                                                                 setuptools.py:123
                             Traceback (most recent call last):                                                                                                                             
                               File "/Users/tw/w/borg-env/lib/python3.11/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject                        
                                 section = defn.get("tool", {})[tool_name]                                                                                                                  
                                           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^                                                                                                                  
                             KeyError: 'setuptools_scm'                                                                                                                                     
                                                                                                                                                                                            
                             The above exception was the direct cause of the following exception:                                                                                           
                                                                                                                                                                                            
                             Traceback (most recent call last):                                                                                                                             
                               File "/Users/tw/w/borg-env/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 121, in infer_version                               
                                 config = _config.Configuration.from_file(dist_name=dist_name)                                                                                              
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                              
                               File "/Users/tw/w/borg-env/lib/python3.11/site-packages/setuptools_scm/_config.py", line 128, in from_file                                                   
                                 pyproject_data = _read_pyproject(name, _load_toml=_load_toml)                                                                                              
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                              
                               File "/Users/tw/w/borg-env/lib/python3.11/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 55, in read_pyproject                        
                                 raise LookupError(f"{name} does not contain a tool.{tool_name} section") from e                                                                            
                             LookupError: pyproject.toml does not contain a tool.setuptools_scm section     

ThomasWaldmann avatar Sep 25 '23 12:09 ThomasWaldmann