Skip to content

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

Closed

Description

@ThomasWaldmann

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     

Activity

  1. added a commit that references this issue on Sep 25, 2023
  2. ThomasWaldmann commented on Sep 25, 2023

    @ThomasWaldmann
    Author

    Note: borg 1.2 is using a minimal pyproject.toml.

    otoh, our master branch has migrated most stuff to pyproject.toml.

  3. RonnyPfannschmidt commented on Sep 25, 2023

    @RonnyPfannschmidt
    Contributor

    @ThomasWaldmann thank for the note a bugfix is already on the way (this is a regression triggered by a bugfix)

  4. added a commit that references this issue on Sep 30, 2023
    bfff678
  5. ThomasWaldmann commented on Jul 17, 2024

    @ThomasWaldmann
    Author

    Looks like this bug just reappeared in setuptools-scm 8.1.0 (again seen with borgbackup 1.2-maint branch). With 8.0.x I don't see this crash:

    (borg-env) tw@server:~/w/borg$ pip install -U "setuptools-scm == 8.1.0"
    Collecting setuptools-scm==8.1.0
      Using cached setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)
    Requirement already satisfied: packaging>=20 in /mnt/fastssd/tw/w/borg-env/lib/python3.12/site-packages (from setuptools-scm==8.1.0) (24.1)
    Requirement already satisfied: setuptools in /mnt/fastssd/tw/w/borg-env/lib/python3.12/site-packages (from setuptools-scm==8.1.0) (70.3.0)
    Using cached setuptools_scm-8.1.0-py3-none-any.whl (43 kB)
    Installing collected packages: setuptools-scm
      Attempting uninstall: setuptools-scm
        Found existing installation: setuptools-scm 8.0.4
        Uninstalling setuptools-scm-8.0.4:
          Successfully uninstalled setuptools-scm-8.0.4
    Successfully installed setuptools-scm-8.1.0
    (borg-env) tw@server:~/w/borg$ python setup.py clean
    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]
    /mnt/fastssd/tw/w/borg-env/lib/python3.12/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)
    WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
    Traceback (most recent call last):
      File "/mnt/fastssd/tw/w/borg-env/lib/python3.12/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
        section = defn.get("tool", {})[tool_name]
                  ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
    KeyError: 'setuptools_scm'
    running clean
    
  6. m-u-xyz commented on Mar 20, 2025

    @m-u-xyz

    Still a problem in 8.2.0 !

  7. RonnyPfannschmidt commented on Mar 21, 2025

    @RonnyPfannschmidt
    Contributor

    Its related to incorrect readong of pyproject data

    It seems the setuptools pin is related and required

  8. dvernon83 commented on Mar 21, 2025

    @dvernon83

    So how to fix this? I cant install python3-saml due to this.

    Using cached python3_saml-1.16.0-py3-none-any.whl (76 kB)
    Using cached isodate-0.7.2-py3-none-any.whl (22 kB)
    Using cached lxml-5.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB)
    Building wheels for collected packages: xmlsec
      Building wheel for xmlsec (pyproject.toml) ... error
      error: subprocess-exited-with-error
    
      × Building wheel for xmlsec (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [29 lines of output]
          WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
          Traceback (most recent call last):
            File "/tmp/pip-build-env-0ktrcu1j/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
              section = defn.get("tool", {})[tool_name]
          KeyError: 'setuptools_scm'
          /tmp/pip-build-env-0ktrcu1j/overlay/lib/python3.10/site-packages/setuptools/dist.py:760: SetuptoolsDeprecationWarning: License classifiers are deprecated.
          !!
    
                  ********************************************************************************
                  Please consider removing the following classifiers in favor of a SPDX license expression:
    
                  License :: OSI Approved :: MIT License
    
                  See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
                  ********************************************************************************
    
          !!
            self._finalize_license_expression()
          running bdist_wheel
          running build
          running build_py
          creating build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/py.typed -> build/lib.linux-x86_64-cpython-310/xmlsec
          running build_ext
          error: xmlsec1 is not installed or not in path.
          [end of output]
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for xmlsec
    Failed to build xmlsec
    ERROR: Failed to build installable wheels for some pyproject.toml based projects (xmlsec)
    sh-4.2# xmlsec1 --version
    xmlsec1 1.2.20 (openssl)
    
    
  9. mattkjames7 commented on Apr 15, 2025

    @mattkjames7

    So how to fix this? I cant install python3-saml due to this.

    Using cached python3_saml-1.16.0-py3-none-any.whl (76 kB)
    Using cached isodate-0.7.2-py3-none-any.whl (22 kB)
    Using cached lxml-5.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB)
    Building wheels for collected packages: xmlsec
      Building wheel for xmlsec (pyproject.toml) ... error
      error: subprocess-exited-with-error
    
      × Building wheel for xmlsec (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [29 lines of output]
          WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
          Traceback (most recent call last):
            File "/tmp/pip-build-env-0ktrcu1j/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
              section = defn.get("tool", {})[tool_name]
          KeyError: 'setuptools_scm'
          /tmp/pip-build-env-0ktrcu1j/overlay/lib/python3.10/site-packages/setuptools/dist.py:760: SetuptoolsDeprecationWarning: License classifiers are deprecated.
          !!
    
                  ********************************************************************************
                  Please consider removing the following classifiers in favor of a SPDX license expression:
    
                  License :: OSI Approved :: MIT License
    
                  See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
                  ********************************************************************************
    
          !!
            self._finalize_license_expression()
          running bdist_wheel
          running build
          running build_py
          creating build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-cpython-310/xmlsec
          copying src/xmlsec/py.typed -> build/lib.linux-x86_64-cpython-310/xmlsec
          running build_ext
          error: xmlsec1 is not installed or not in path.
          [end of output]
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for xmlsec
    Failed to build xmlsec
    ERROR: Failed to build installable wheels for some pyproject.toml based projects (xmlsec)
    sh-4.2# xmlsec1 --version
    xmlsec1 1.2.20 (openssl)
    

    This is an unrelated error to the original (see xmlsec/python-xmlsec#345). To fix this particular problem, either install xmlsec libs (e.g. with apt) or install the previous version e.g. pip install xmlsec==1.3.14.

  10. Mahalakshmivignesh commented on Apr 27, 2025

    @Mahalakshmivignesh

    i am also getting similar error while installing matplotlib=3.7.2. The wheel building fails with below message.

    22:46:37  #7 1537.8   Building wheel for matplotlib (pyproject.toml): finished with status 'error'
    22:46:37  #7 1538.3   error: subprocess-exited-with-error
    22:46:37  #7 1538.3   
    22:46:37  #7 1538.3   × Building wheel for matplotlib (pyproject.toml) did not run successfully.
    22:46:37  #7 1538.3   │ exit code: 1
    22:46:37  #7 1538.3   ╰─> [866 lines of output]
    22:46:37  #7 1538.3       /tmp/pip-build-env-bzm732jz/overlay/lib/python3.11/site-packages/setuptools/dist.py:806: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
    22:46:37  #7 1538.3       !!
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3               ********************************************************************************
    22:46:37  #7 1538.3               Please replace its usage with implicit namespaces (PEP 420).
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3               See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
    22:46:37  #7 1538.3               ********************************************************************************
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3       !!
    22:46:37  #7 1538.3         ep.load()(self, ep.name, value)
    22:46:37  #7 1538.3       WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
    22:46:37  #7 1538.3       Traceback (most recent call last):
    22:46:37  #7 1538.3         File "/tmp/pip-build-env-bzm732jz/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
    22:46:37  #7 1538.3           section = defn.get("tool", {})[tool_name]
    22:46:37  #7 1538.3                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
    22:46:37  #7 1538.3       KeyError: 'setuptools_scm'
    22:46:37  #7 1538.3       /tmp/pip-build-env-bzm732jz/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:310: UserWarning: git archive did not support describe output
    22:46:37  #7 1538.3         warnings.warn("git archive did not support describe output")
    22:46:37  #7 1538.3       /tmp/pip-build-env-bzm732jz/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:328: UserWarning: unprocessed git archival found (no export subst applied)
    22:46:37  #7 1538.3         warnings.warn("unprocessed git archival found (no export subst applied)")
    22:46:37  #7 1538.3       /tmp/pip-build-env-bzm732jz/overlay/lib/python3.11/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
    22:46:37  #7 1538.3       !!
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3               ********************************************************************************
    22:46:37  #7 1538.3               Please consider removing the following classifiers in favor of a SPDX license expression:
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3               License :: OSI Approved :: Python Software Foundation License
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3               See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
    22:46:37  #7 1538.3               ********************************************************************************
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3       !!
    22:46:37  #7 1538.3         self._finalize_license_expression()
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3       Edit mplsetup.cfg to change the build options; suppress output with --quiet.
    22:46:37  #7 1538.3       
    22:46:37  #7 1538.3       BUILDING MATPLOTLIB
    22:46:37  #7 1538.3             python: yes [3.11.9 (main, Apr  2 2025, 00:00:00) [GCC 11.5.0 20240719
    22:46:37  #7 1538.3                         (Red Hat 11.5.0-5)]]
    22:46:37  #7 1538.3           platform: yes [linux]
    22:46:37  #7 1538.3              tests: no  [skipping due to configuration]
    22:46:37  #7 1538.3             macosx: no  [Mac OS-X only]
    
  11. RonnyPfannschmidt commented on Apr 27, 2025

    @RonnyPfannschmidt
    Contributor

    @Mahalakshmivignesh please build with SETUPTOOLS_SCM_DEBUG=1 at first glance yours is not related to setuptools_scm but rather to setuptools and deprecations that happened

  12. RonnyPfannschmidt commented on Apr 27, 2025

    @RonnyPfannschmidt
    Contributor

    @mattkjames7 yours is unrelated - error: xmlsec1 is not installed or not in path.

  13. RonnyPfannschmidt commented on Jul 30, 2025

    @RonnyPfannschmidt
    Contributor

    the handling for this has been mostly resolved - modern build tooling is needed

  14. ThomasWaldmann commented on Aug 4, 2025

    @ThomasWaldmann
    Author

    I am still seeing this issue in borg 1.2-maint:

    (borg-env) tw@MacBook-Pro borg % python setup.py clean                         
    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.10/site-packages/setuptools/__init__.py:92: _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`.
    
            By 2025-Oct-31, you need to update your project and remove deprecated calls
            or your builds will no longer be supported.
            ********************************************************************************
    
    !!
      dist.fetch_build_eggs(dist.setup_requires)
    [08/04/25 16:01:42] WARNING  toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'                            pyproject_reading.py:42
                                 Traceback (most recent call last):                                                                                                     
                                   File "/Users/tw/w/borg-env/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py",                           
                                 line 36, in read_pyproject                                                                                                             
                                     section = defn.get("tool", {})[tool_name]                                                                                          
                                 KeyError: 'setuptools_scm'                                                                                                             
    /Users/tw/w/borg-env/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
    !!
    
            ********************************************************************************
            Please consider removing the following classifiers in favor of a SPDX license expression:
    
            License :: OSI Approved :: BSD License
    
            See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
            ********************************************************************************
    
    !!
      self._finalize_license_expression()
    running clean
    

    Python 3.10.18
    setuptools-scm==8.3.1

  15. ThomasWaldmann commented on Aug 4, 2025

    @ThomasWaldmann
    Author

    And a debug run:

    (borg-env) tw@MacBook-Pro borg % export SETUPTOOLS_SCM_DEBUG=1 
    (borg-env) tw@MacBook-Pro borg % python setup.py clean        
    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.10/site-packages/setuptools/__init__.py:92: _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`.
    
            By 2025-Oct-31, you need to update your project and remove deprecated calls
            or your builds will no longer be supported.
            ********************************************************************************
    
    !!
      dist.fetch_build_eggs(dist.setup_requires)
    [08/04/25 16:05:05] DEBUG    version_keyword {'name': 'borgbackup', 'version': None, 'author': 'The Borg Collective (see AUTHORS file)',            setuptools.py:68
                                 'author_email': '[email protected]', 'maintainer': None, 'maintainer_email': None, 'url':                                          
                                 'https://borgbackup.readthedocs.io/', 'license': 'BSD', 'description': 'Deduplicated, encrypted, authenticated and                     
                                 compressed backups', 'long_description': '\nWhat is BorgBackup?\n-------------------\n\nBorgBackup (short: Borg) is a                  
                                 deduplicating backup program.\nOptionally, it supports compression and authenticated encryption.\n\nThe main goal of                   
                                 Borg is to provide an efficient and secure way to backup data.\nThe data deduplication technique used makes Borg                       
                                 suitable for daily backups\nsince only changes are stored.\nThe authenticated encryption technique makes it suitable                   
                                 for backups to not\nfully trusted targets.\n\nSee the `installation manual`_ or, if you have already\ndownloaded Borg,                 
                                 ``docs/installation.rst`` to get started with Borg.\nThere is also an `offline documentation`_ available, in multiple                  
                                 formats.\n\n.. _installation manual: https://borgbackup.readthedocs.org/en/stable/installation.html\n.. _offline                       
                                 documentation: https://readthedocs.org/projects/borgbackup/downloads\n\nMain features\n~~~~~~~~~~~~~\n\n**Space                        
                                 efficient storage**\n  Deduplication based on content-defined chunking is used to reduce the number\n  of bytes                        
                                 stored: each file is split into a number of variable length chunks\n  and only chunks that have never been seen before                 
                                 are added to the repository.\n\n  A chunk is considered duplicate if its id_hash value is identical.\n  A                              
                                 cryptographically strong hash or MAC function is used as id_hash, e.g.\n  (hmac-)sha256.\n\n  To deduplicate, all the                  
                                 chunks in the same repository are considered, no\n  matter whether they come from different machines, from previous                    
                                 backups,\n  from the same backup or even from the same single file.\n\n  Compared to other deduplication approaches,                   
                                 this method does NOT depend on:\n\n  * file/directory names staying the same: So you can move your stuff around\n                      
                                 without killing the deduplication, even between machines sharing a repo.\n\n  * complete files or time stamps staying                  
                                 the same: If a big file changes a\n    little, only a few new chunks need to be stored - this is great for VMs or\n                    
                                 raw disks.\n\n  * The absolute position of a data chunk inside a file: Stuff may get shifted\n    and will still be                    
                                 found by the deduplication algorithm.\n\n**Speed**\n  * performance-critical code (chunking, compression, encryption)                  
                                 is\n    implemented in C/Cython\n  * local caching of files/chunks index data\n  * quick detection of unmodified                       
                                 files\n\n**Data encryption**\n    All data can be protected using 256-bit AES encryption, data integrity and\n                         
                                 authenticity is verified using HMAC-SHA256. Data is encrypted clientside.\n\n**Obfuscation**\n    Optionally, borg can                 
                                 actively obfuscate e.g. the size of files / chunks to\n    make fingerprinting attacks more                                            
                                 difficult.\n\n**Compression**\n    All data can be optionally compressed:\n\n    * lz4 (super fast, low compression)\n                 
                                 * zstd (wide range from high speed and low compression to high compression\n      and lower speed)\n    * zlib (medium                 
                                 speed and compression)\n    * lzma (low speed, high compression)\n\n**Off-site backups**\n    Borg can store data on                   
                                 any remote host accessible over SSH.  If Borg is\n    installed on the remote host, big performance gains can be                       
                                 achieved\n    compared to using a network filesystem (sshfs, nfs, ...).\n\n**Backups mountable as filesystems**\n                      
                                 Backup archives are mountable as userspace filesystems for easy interactive\n    backup examination and restores (e.g.                 
                                 by using a regular file manager).\n\n**Easy installation on multiple platforms**\n    We offer single-file binaries                    
                                 that do not require installing anything -\n    you can just run them on these platforms:\n\n    * Linux\n    * Mac OS                  
                                 X\n    * FreeBSD\n    * OpenBSD and NetBSD (no xattrs/ACLs support or binaries yet)\n    * Cygwin (experimental, no                    
                                 binaries yet)\n    * Linux Subsystem of Windows 10 (experimental)\n\n**Free and Open Source Software**\n  * security                   
                                 and functionality can be audited independently\n  * licensed under the BSD (3-clause) license, see `License`_ for                      
                                 the\n    complete license\n\nEasy to use\n~~~~~~~~~~~\n\nInitialize a new backup repository (see ``borg init --help``                  
                                 for encryption options)::\n\n    $ borg init -e repokey /path/to/repo\n\nCreate a backup archive::\n\n    $ borg                       
                                 create /path/to/repo::Saturday1 ~/Documents\n\nNow doing another backup, just to show off the great                                    
                                 deduplication::\n\n    $ borg create -v --stats /path/to/repo::Saturday2 ~/Documents\n                                                 
                                 -----------------------------------------------------------------------------\n    Archive name: Saturday2\n                           
                                 Archive fingerprint: 622b7c53c...\n    Time (start): Sat, 2016-02-27 14:48:13\n    Time (end):   Sat, 2016-02-27                       
                                 14:48:14\n    Duration: 0.88 seconds\n    Number of files: 163\n                                                                       
                                 -----------------------------------------------------------------------------\n                   Original size                        
                                 Compressed size    Deduplicated size\n    This archive:        6.85 MB              6.85 MB             30.79 kB  <--                  
                                 !\n    All archives:       13.69 MB             13.71 MB              6.88 MB\n\n                   Unique chunks                      
                                 Total chunks\n    Chunk index:             167                  330\n                                                                  
                                 -----------------------------------------------------------------------------\n\n\nFor a graphical frontend refer to                   
                                 our complementary project `BorgWeb <https://borgweb.readthedocs.io/>`_.\n\nHelping, Donations and Bounties, becoming a                 
                                 Patron\n--------------------------------------------------\n\nYour help is always welcome!\n\nSpread the word, give                    
                                 feedback, help with documentation, testing or development.\n\nYou can also give monetary support to the project, see                   
                                 there for details:\n\nhttps://www.borgbackup.org/support/fund.html\n\nLinks\n-----\n\n* `Main Web Site                                 
                                 <https://borgbackup.readthedocs.org/>`_\n* `Releases <https://github.com/borgbackup/borg/releases>`_,\n  `PyPI                         
                                 packages <https://pypi.python.org/pypi/borgbackup>`_ and\n  `ChangeLog                                                                 
                                 <https://github.com/borgbackup/borg/blob/master/docs/changes.rst>`_\n* `Offline Documentation                                          
                                 <https://readthedocs.org/projects/borgbackup/downloads>`_\n* `GitHub <https://github.com/borgbackup/borg>`_ and\n                      
                                 `Issue Tracker <https://github.com/borgbackup/borg/issues>`_.\n* `Web-Chat (IRC)                                                       
                                 <https://web.libera.chat/#borgbackup>`_ and\n  `Mailing List                                                                           
                                 <https://mail.python.org/mailman/listinfo/borgbackup>`_\n* `License                                                                    
                                 <https://borgbackup.readthedocs.org/en/stable/authors.html#license>`_\n* `Security contact                                             
                                 <https://borgbackup.readthedocs.io/en/latest/support.html#security-contact>`_\n\nCompatibility                                         
                                 notes\n-------------------\n\nEXPECT THAT WE WILL BREAK COMPATIBILITY REPEATEDLY WHEN MAJOR RELEASE NUMBER\nCHANGES                    
                                 (like when going from 0.x.y to 1.0.0 or from 1.x.y to 2.0.0).\n\nNOT RELEASED DEVELOPMENT VERSIONS HAVE UNKNOWN                        
                                 COMPATIBILITY PROPERTIES.\n\nTHIS IS SOFTWARE IN DEVELOPMENT, DECIDE YOURSELF WHETHER IT FITS YOUR NEEDS.\n\nSecurity                  
                                 issues should be reported to the `Security contact`_ (or\nsee ``docs/support.rst`` in the source                                       
                                 distribution).\n\n\n', 'keywords': None, 'platforms': ['Linux', 'MacOS X', 'FreeBSD', 'OpenBSD', 'NetBSD'],                            
                                 'classifiers': ['Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: System                               
                                 Administrators', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: BSD :: FreeBSD', 'Operating                   
                                 System :: POSIX :: BSD :: OpenBSD', 'Operating System :: POSIX :: BSD :: NetBSD', 'Operating System :: MacOS :: MacOS                  
                                 X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3',                     
                                 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python ::                   
                                 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Topic :: Security ::                       
                                 Cryptography', 'Topic :: System :: Archiving :: Backup'], 'download_url': None, 'provides': None, 'requires': None,                    
                                 'obsoletes': None}                                                                                                                     
                        WARNING  toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'                            pyproject_reading.py:42
                                 Traceback (most recent call last):                                                                                                     
                                   File "/Users/tw/w/borg-env/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py",                           
                                 line 36, in read_pyproject                                                                                                             
                                     section = defn.get("tool", {})[tool_name]                                                                                          
                                 KeyError: 'setuptools_scm'                                                                                                             
                        DEBUG    dist name: borgbackup                                                                                                  _overrides.py:41
                        DEBUG    check absolute root=. relative_to=pyproject.toml                                                                          _config.py:61
                        DEBUG    file pyproject.toml                                                                                                       _config.py:80
                        DEBUG    version_from_ep setuptools_scm.parse_scm in /Users/tw/w/borg                                                         _entrypoints.py:47
                        DEBUG    looking for ep setuptools_scm.parse_scm in /Users/tw/w/borg                                                              discover.py:65
                        DEBUG    found ep EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') in /Users/tw/w/borg discover.py:72
                        DEBUG    at .                                                                                                                    _run_cmd.py:148
                                     $ git version                                                                                                                      
                        DEBUG    out:                                                                                                                    _run_cmd.py:171
                                     git version 2.50.1                                                                                                                 
                        DEBUG    at /Users/tw/w/borg                                                                                                     _run_cmd.py:148
                                     $ git --git-dir /Users/tw/w/borg/.git rev-parse --show-prefix                                                                      
    [08/04/25 16:05:06] DEBUG    real root /Users/tw/w/borg                                                                                                    git.py:90
                        DEBUG    at /Users/tw/w/borg                                                                                                     _run_cmd.py:148
                                     $ git --git-dir /Users/tw/w/borg/.git describe --dirty --tags --long --match "*[0-9]*"                                             
                        DEBUG    out:                                                                                                                    _run_cmd.py:171
                                     1.2.8-83-g9352330d9                                                                                                                
                        DEBUG    tag 1.2.8                                                                                                                 version.py:97
                        DEBUG    '1.2.8' re.compile('^(?:[\\w-]+-)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$') <re.Match object; span=(0,   version.py:61
                                 5), match='1.2.8'>                                                                                                                     
                        DEBUG    key 1 data {'version': '1.2.8'}, ('1.2.8',), '1.2.8'                                                                      version.py:62
                        DEBUG    tag '1.2.8' parsed to {'version': '1.2.8', 'prefix': '', 'suffix': ''}                                                    version.py:71
                        DEBUG    version pre parse 1.2.8                                                                                                  version.py:105
                        DEBUG    version=<Version('1.2.8')>                                                                                               version.py:111
                        INFO     version 1.2.8 -> 1.2.8                                                                                                   version.py:217
                        DEBUG    at /Users/tw/w/borg                                                                                                     _run_cmd.py:148
                                     $ git --git-dir /Users/tw/w/borg/.git rev-parse --abbrev-ref HEAD                                                                  
                        DEBUG    out:                                                                                                                    _run_cmd.py:171
                                     rel129                                                                                                                             
                        DEBUG    at /Users/tw/w/borg                                                                                                     _run_cmd.py:148
                                     $ git --git-dir /Users/tw/w/borg/.git -c log.showSignature=false log -n 1 HEAD --format=%cI                                        
                        DEBUG    out:                                                                                                                    _run_cmd.py:171
                                     2025-08-04T15:54:46+02:00                                                                                                          
                        DEBUG    EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') found <ScmVersion 1.2.8  _entrypoints.py:51
                                 dist=83 node=g9352330d9 dirty=False branch=rel129>                                                                                     
                        DEBUG    scm version <ScmVersion 1.2.8 dist=83 node=g9352330d9 dirty=False branch=rel129>                                         version.py:437
                        DEBUG    config Configuration(relative_to='pyproject.toml', root='.', version_scheme='guess-next-dev',                            version.py:438
                                 local_scheme='node-and-date',                                                                                                          
                                 tag_regex=re.compile('^(?:[\\w-]+-)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$'),                                        
                                 parentdir_prefix_version=None, fallback_version=None, fallback_root='.', write_to='src/borg/_version.py',                              
                                 write_to_template='__version__ = version = {version!r}\n', version_file=None, version_file_template=None, parse=None,                  
                                 git_describe_command=None, dist_name='borgbackup', version_cls=<class 'packaging.version.Version'>,                                    
                                 search_parent_directories=False, parent=PosixPath('/Users/tw/w/borg'))                                                                 
                        DEBUG    ep found: guess-next-dev                                                                                             _entrypoints.py:59
                        DEBUG    version 1.2.9.dev83                                                                                                      version.py:445
                        DEBUG    ep found: node-and-date                                                                                              _entrypoints.py:59
                        DEBUG    local_version +g9352330d9                                                                                                version.py:450
                        DEBUG    dump 1.2.9.dev83+g9352330d9 into src/borg/_version.py                                                                dump_version.py:88
                        DEBUG    infer_version {'name': 'borgbackup', 'version': '1.2.9.dev83+g9352330d9', 'author': 'The Borg Collective (see AUTHORS  setuptools.py:68
                                 file)', 'author_email': '[email protected]', 'maintainer': None, 'maintainer_email': None, 'url':                                  
                                 'https://borgbackup.readthedocs.io/', 'license': 'BSD', 'description': 'Deduplicated, encrypted, authenticated and                     
                                 compressed backups', 'long_description': '\nWhat is BorgBackup?\n-------------------\n\nBorgBackup (short: Borg) is a                  
                                 deduplicating backup program.\nOptionally, it supports compression and authenticated encryption.\n\nThe main goal of                   
                                 Borg is to provide an efficient and secure way to backup data.\nThe data deduplication technique used makes Borg                       
                                 suitable for daily backups\nsince only changes are stored.\nThe authenticated encryption technique makes it suitable                   
                                 for backups to not\nfully trusted targets.\n\nSee the `installation manual`_ or, if you have already\ndownloaded Borg,                 
                                 ``docs/installation.rst`` to get started with Borg.\nThere is also an `offline documentation`_ available, in multiple                  
                                 formats.\n\n.. _installation manual: https://borgbackup.readthedocs.org/en/stable/installation.html\n.. _offline                       
                                 documentation: https://readthedocs.org/projects/borgbackup/downloads\n\nMain features\n~~~~~~~~~~~~~\n\n**Space                        
                                 efficient storage**\n  Deduplication based on content-defined chunking is used to reduce the number\n  of bytes                        
                                 stored: each file is split into a number of variable length chunks\n  and only chunks that have never been seen before                 
                                 are added to the repository.\n\n  A chunk is considered duplicate if its id_hash value is identical.\n  A                              
                                 cryptographically strong hash or MAC function is used as id_hash, e.g.\n  (hmac-)sha256.\n\n  To deduplicate, all the                  
                                 chunks in the same repository are considered, no\n  matter whether they come from different machines, from previous                    
                                 backups,\n  from the same backup or even from the same single file.\n\n  Compared to other deduplication approaches,                   
                                 this method does NOT depend on:\n\n  * file/directory names staying the same: So you can move your stuff around\n                      
                                 without killing the deduplication, even between machines sharing a repo.\n\n  * complete files or time stamps staying                  
                                 the same: If a big file changes a\n    little, only a few new chunks need to be stored - this is great for VMs or\n                    
                                 raw disks.\n\n  * The absolute position of a data chunk inside a file: Stuff may get shifted\n    and will still be                    
                                 found by the deduplication algorithm.\n\n**Speed**\n  * performance-critical code (chunking, compression, encryption)                  
                                 is\n    implemented in C/Cython\n  * local caching of files/chunks index data\n  * quick detection of unmodified                       
                                 files\n\n**Data encryption**\n    All data can be protected using 256-bit AES encryption, data integrity and\n                         
                                 authenticity is verified using HMAC-SHA256. Data is encrypted clientside.\n\n**Obfuscation**\n    Optionally, borg can                 
                                 actively obfuscate e.g. the size of files / chunks to\n    make fingerprinting attacks more                                            
                                 difficult.\n\n**Compression**\n    All data can be optionally compressed:\n\n    * lz4 (super fast, low compression)\n                 
                                 * zstd (wide range from high speed and low compression to high compression\n      and lower speed)\n    * zlib (medium                 
                                 speed and compression)\n    * lzma (low speed, high compression)\n\n**Off-site backups**\n    Borg can store data on                   
                                 any remote host accessible over SSH.  If Borg is\n    installed on the remote host, big performance gains can be                       
                                 achieved\n    compared to using a network filesystem (sshfs, nfs, ...).\n\n**Backups mountable as filesystems**\n                      
                                 Backup archives are mountable as userspace filesystems for easy interactive\n    backup examination and restores (e.g.                 
                                 by using a regular file manager).\n\n**Easy installation on multiple platforms**\n    We offer single-file binaries                    
                                 that do not require installing anything -\n    you can just run them on these platforms:\n\n    * Linux\n    * Mac OS                  
                                 X\n    * FreeBSD\n    * OpenBSD and NetBSD (no xattrs/ACLs support or binaries yet)\n    * Cygwin (experimental, no                    
                                 binaries yet)\n    * Linux Subsystem of Windows 10 (experimental)\n\n**Free and Open Source Software**\n  * security                   
                                 and functionality can be audited independently\n  * licensed under the BSD (3-clause) license, see `License`_ for                      
                                 the\n    complete license\n\nEasy to use\n~~~~~~~~~~~\n\nInitialize a new backup repository (see ``borg init --help``                  
                                 for encryption options)::\n\n    $ borg init -e repokey /path/to/repo\n\nCreate a backup archive::\n\n    $ borg                       
                                 create /path/to/repo::Saturday1 ~/Documents\n\nNow doing another backup, just to show off the great                                    
                                 deduplication::\n\n    $ borg create -v --stats /path/to/repo::Saturday2 ~/Documents\n                                                 
                                 -----------------------------------------------------------------------------\n    Archive name: Saturday2\n                           
                                 Archive fingerprint: 622b7c53c...\n    Time (start): Sat, 2016-02-27 14:48:13\n    Time (end):   Sat, 2016-02-27                       
                                 14:48:14\n    Duration: 0.88 seconds\n    Number of files: 163\n                                                                       
                                 -----------------------------------------------------------------------------\n                   Original size                        
                                 Compressed size    Deduplicated size\n    This archive:        6.85 MB              6.85 MB             30.79 kB  <--                  
                                 !\n    All archives:       13.69 MB             13.71 MB              6.88 MB\n\n                   Unique chunks                      
                                 Total chunks\n    Chunk index:             167                  330\n                                                                  
                                 -----------------------------------------------------------------------------\n\n\nFor a graphical frontend refer to                   
                                 our complementary project `BorgWeb <https://borgweb.readthedocs.io/>`_.\n\nHelping, Donations and Bounties, becoming a                 
                                 Patron\n--------------------------------------------------\n\nYour help is always welcome!\n\nSpread the word, give                    
                                 feedback, help with documentation, testing or development.\n\nYou can also give monetary support to the project, see                   
                                 there for details:\n\nhttps://www.borgbackup.org/support/fund.html\n\nLinks\n-----\n\n* `Main Web Site                                 
                                 <https://borgbackup.readthedocs.org/>`_\n* `Releases <https://github.com/borgbackup/borg/releases>`_,\n  `PyPI                         
                                 packages <https://pypi.python.org/pypi/borgbackup>`_ and\n  `ChangeLog                                                                 
                                 <https://github.com/borgbackup/borg/blob/master/docs/changes.rst>`_\n* `Offline Documentation                                          
                                 <https://readthedocs.org/projects/borgbackup/downloads>`_\n* `GitHub <https://github.com/borgbackup/borg>`_ and\n                      
                                 `Issue Tracker <https://github.com/borgbackup/borg/issues>`_.\n* `Web-Chat (IRC)                                                       
                                 <https://web.libera.chat/#borgbackup>`_ and\n  `Mailing List                                                                           
                                 <https://mail.python.org/mailman/listinfo/borgbackup>`_\n* `License                                                                    
                                 <https://borgbackup.readthedocs.org/en/stable/authors.html#license>`_\n* `Security contact                                             
                                 <https://borgbackup.readthedocs.io/en/latest/support.html#security-contact>`_\n\nCompatibility                                         
                                 notes\n-------------------\n\nEXPECT THAT WE WILL BREAK COMPATIBILITY REPEATEDLY WHEN MAJOR RELEASE NUMBER\nCHANGES                    
                                 (like when going from 0.x.y to 1.0.0 or from 1.x.y to 2.0.0).\n\nNOT RELEASED DEVELOPMENT VERSIONS HAVE UNKNOWN                        
                                 COMPATIBILITY PROPERTIES.\n\nTHIS IS SOFTWARE IN DEVELOPMENT, DECIDE YOURSELF WHETHER IT FITS YOUR NEEDS.\n\nSecurity                  
                                 issues should be reported to the `Security contact`_ (or\nsee ``docs/support.rst`` in the source                                       
                                 distribution).\n\n\n', 'keywords': None, 'platforms': ['Linux', 'MacOS X', 'FreeBSD', 'OpenBSD', 'NetBSD'],                            
                                 'classifiers': ['Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: System                               
                                 Administrators', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: BSD :: FreeBSD', 'Operating                   
                                 System :: POSIX :: BSD :: OpenBSD', 'Operating System :: POSIX :: BSD :: NetBSD', 'Operating System :: MacOS :: MacOS                  
                                 X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3',                     
                                 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python ::                   
                                 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Topic :: Security ::                       
                                 Cryptography', 'Topic :: System :: Archiving :: Backup'], 'download_url': None, 'provides': None, 'requires': None,                    
                                 'obsoletes': None}                                                                                                                     
                        DEBUG    dist 4392173040 4392173424                                                                                            setuptools.py:108
    /Users/tw/w/borg-env/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
    !!
    
            ********************************************************************************
            Please consider removing the following classifiers in favor of a SPDX license expression:
    
            License :: OSI Approved :: BSD License
    
            See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
            ********************************************************************************
    
    !!
      self._finalize_license_expression()
    running clean
    
  16. RonnyPfannschmidt commented on Aug 4, 2025

    @RonnyPfannschmidt
    Contributor

    @ThomasWaldmann that particular issue is something else and getting resolved today

    also please note that building using setup.py has been deprecated in setuptools and one ie expected to use the build backend

  17. ThomasWaldmann commented on Aug 4, 2025

    @ThomasWaldmann
    Author

    Well, it looked pretty similar to the top post.

    borg 1.4 and master are using more modern tooling, I just wanted to do a final 1.2.9 release with as little changes as possible.

  18. RonnyPfannschmidt commented on Aug 4, 2025

    @RonnyPfannschmidt
    Contributor

    @ThomasWaldmann the new error looks the same because it triggers the same bad code path for a very different reason

  19. lovettchris commented on Aug 5, 2025

    @lovettchris

    I'm also getting this error starting yesterday on a repo I've not changed and has been working fine for a years.

  20. RonnyPfannschmidt commented on Aug 5, 2025

    @RonnyPfannschmidt
    Contributor

    plese see #1184 fix was just released for that one as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions