Repository: borgbackup/borg

Issue:
strange warnings / build failure for 1.2.1
reported by lazyvirus on the borgbackup mailing list:

debian bullseye
======================

Hi,

I uninstalled 1.1.18 to replace it with 1.2.1, checked all
dependencies were installed, but pip3 is failing and I don't
know why.

As it is a long output it is attached as a text file.

So, if you have a solution, I'll take it.

Jean-Yves

```
# pip3 install borgbackup
Collecting borgbackup
  Using cached borgbackup-1.2.1.tar.gz (4.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: packaging in /usr/lib/python3/dist-packages (from borgbackup) (20.9)
Requirement already satisfied: msgpack!=1.0.1,<=1.0.4,>=0.5.6 in /usr/lib/python3/dist-packages (from borgbackup) (1.0.0)
Building wheels for collected packages: borgbackup
  Building wheel for borgbackup (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for borgbackup (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [373 lines of output]
      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]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/__main__.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/repository.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/lrucache.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/archive.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/locking.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/fuse_impl.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/_version.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/cache.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/constants.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/nanorst.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/upgrader.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/platformflags.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/fuse.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/__init__.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/archiver.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/selftest.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/remote.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/xattr.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/patterns.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/version.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/shellpattern.py -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/logger.py -> build/lib.linux-x86_64-cpython-39/borg
      creating build/lib.linux-x86_64-cpython-39/borg/crypto
      copying src/borg/crypto/file_integrity.py -> build/lib.linux-x86_64-cpython-39/borg/crypto
      copying src/borg/crypto/__init__.py -> build/lib.linux-x86_64-cpython-39/borg/crypto
      copying src/borg/crypto/key.py -> build/lib.linux-x86_64-cpython-39/borg/crypto
      copying src/borg/crypto/nonces.py -> build/lib.linux-x86_64-cpython-39/borg/crypto
      copying src/borg/crypto/keymanager.py -> build/lib.linux-x86_64-cpython-39/borg/crypto
      creating build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/checks.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/errors.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/__init__.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/parseformat.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/manifest.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/fs.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/yes.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/time.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/misc.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/msgpack.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/datastruct.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/progress.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      copying src/borg/helpers/process.py -> build/lib.linux-x86_64-cpython-39/borg/helpers
      creating build/lib.linux-x86_64-cpython-39/borg/platform
      copying src/borg/platform/__init__.py -> build/lib.linux-x86_64-cpython-39/borg/platform
      copying src/borg/platform/xattr.py -> build/lib.linux-x86_64-cpython-39/borg/platform
      copying src/borg/platform/base.py -> build/lib.linux-x86_64-cpython-39/borg/platform
      creating build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/repository.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/lrucache.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/archive.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/item.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/locking.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/benchmark.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/file_integrity.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/cache.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/nanorst.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/hashindex.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/upgrader.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/compress.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/helpers.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/__init__.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/chunker_pytest.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/archiver.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/crypto.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/platform.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/remote.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/xattr.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/key.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/patterns.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/nonces.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/efficient_collection_queue.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/version.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/shellpattern.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/logger.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/checksums.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/chunker.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      copying src/borg/testsuite/chunker_slow.py -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      creating build/lib.linux-x86_64-cpython-39/borg/algorithms
      copying src/borg/algorithms/__init__.py -> build/lib.linux-x86_64-cpython-39/borg/algorithms
      running egg_info
      writing src/borgbackup.egg-info/PKG-INFO
      writing dependency_links to src/borgbackup.egg-info/dependency_links.txt
      writing entry points to src/borgbackup.egg-info/entry_points.txt
      writing requirements to src/borgbackup.egg-info/requires.txt
      writing top-level names to src/borgbackup.egg-info/top_level.txt
      listing git files failed - pretending there aren't any
      reading manifest file 'src/borgbackup.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files found matching '.coafile'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.gitattributes'
      warning: no previously-included files found matching '.gitignore'
      warning: no previously-included files found matching '.mailmap'
      warning: no previously-included files found matching 'Vagrantfile'
      no previously-included directories found matching '.github'
      adding license file 'LICENSE'
      adding license file 'AUTHORS'
      writing manifest file 'src/borgbackup.egg-info/SOURCES.txt'
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.lz4.lib' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.lz4.lib' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.lz4.lib' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.lz4.lib' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.xxh64' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.xxh64' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.xxh64' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.xxh64' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib.common' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib.common' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib.common' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib.common' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib.compress' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib.compress' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib.compress' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib.compress' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib.decompress' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib.decompress' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib.decompress' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib.decompress' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib.deprecated' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib.deprecated' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib.deprecated' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib.deprecated' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib.dictBuilder' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib.dictBuilder' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib.dictBuilder' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib.dictBuilder' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.algorithms.zstd.lib.legacy' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.algorithms.zstd.lib.legacy' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.algorithms.zstd.lib.legacy' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.algorithms.zstd.lib.legacy' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /usr/local/lib/python3.9/dist-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'borg.cache_sync' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.cache_sync' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'borg.cache_sync' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'borg.cache_sync' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      copying src/borg/paperkey.html -> build/lib.linux-x86_64-cpython-39/borg
      copying src/borg/testsuite/attic.tar.gz -> build/lib.linux-x86_64-cpython-39/borg/testsuite
      running build_ext
      building 'borg.crypto.low_level' extension
      error: unknown file type '.pyx' (from 'src/borg/crypto/low_level.pyx')
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for borgbackup
Failed to build borgbackup
ERROR: Could not build wheels for borgbackup, which is required to install pyproject.toml-based projects
```


Discussion:
My answer from the mailing list:

...

But the error is close to the end of the log:

error: unknown file type '.pyx' (from 'src/borg/crypto/low_level.pyx')

This is a bit unusual also, because the corresponding .c file should be used for a borg release version (so a C compiler is sufficient) and thus the .pyx should not be needed to get processed at all (which requires to have Cython installed). 

I tried, but I can not reproduce:
```
tw@c64:~/w/borg$ vagrant ssh bullseye64
Linux bullseye 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64

vagrant@bullseye:~$ python3.9
Python 3.9.13 (main, Jul 23 2022, 20:43:57) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

vagrant@bullseye:~$ python3.9 -m venv env
vagrant@bullseye:~$ . env/bin/activate
(env) vagrant@bullseye:~$ pip install borgbackup
Collecting borgbackup
  Downloading borgbackup-1.2.1.tar.gz (4.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 3.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
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting msgpack!=1.0.1,<=1.0.4,>=0.5.6
  Using cached msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (322 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: borgbackup
  Building wheel for borgbackup (pyproject.toml) ... done
  Created wheel for borgbackup: filename=borgbackup-1.2.1-cp39-cp39-linux_x86_64.whl size=3377799 sha256=af0633a7d547edc6df1a12ae21c8d7ffd12000f7ef6c85702d4d856806c0a017
  Stored in directory: /home/vagrant/.cache/pip/wheels/27/8c/c5/02ff61313d7db6dadbfc5ddba1da48907fcc84b78414ec226b
Successfully built borgbackup
Installing collected packages: msgpack, pyparsing, packaging, borgbackup
Successfully installed borgbackup-1.2.1 msgpack-1.0.4 packaging-21.3 pyparsing-3.0.9
WARNING: You are using pip version 22.0.4; however, version 22.2 is available.
You should consider upgrading via the '/home/vagrant/env/bin/python3.9 -m pip install --upgrade pip' command.

(env) vagrant@bullseye:~$ borg -V
borg 1.2.1
```

I also tried upgrading pip and setuptools to latest, also succeeds.
The setuptools "Package would be ignored" warnings get visible via:
```
pip install -v .  # note: -ve . does not give these warnings
```

I fixed them in master branch by putting a dummy `__init__.py` in these directories, see #6934.

Feels dirty, but seems like it made setuptools happy. :-)

@RonnyPfannschmidt is there a better way? These dirs are not really packages, just contain random bundled C stuff.
@lazyvirus ^^^
Are those sources of libs, it may be necessary to explicitly exclude them on recent setuptools (which gets more strict on footguns)


- bundled lib sources (only in borg 1.2, master branch has nothing bundled)
- own pure C stuff (e.g. our cache synchronizer, that gets used via Cython)

ok, i'll look up how to exclude them, thanks!
tried `prune` in `MANIFEST.in`, but that would remove it from the sdist (but we need it in there).
```
    packages=find_packages('src'),
    package_dir={'': 'src'},
    # See also the MANIFEST.in file.
    # We want to install all the files in the package directories...
    include_package_data=True,
    # ...except the source files which have been compiled (C extensions):
    exclude_package_data={
        '': ['*.c', '*.h', '*.pyx', ],
    },
```
The last item already should exclude all the files in these dirs.
also does not work:
```
    packages=find_packages('src', exclude=['borg.cache_sync']),
```
Not true (there is no `__init__.py`):

```
          Python recognizes 'borg.cache_sync' as an importable package,
```
also does not work:
```
    include_package_data=True,
    # ...except the source files which have been compiled (C extensions):
    exclude_package_data={
        '': ['*.c', '*.h', '*.pyx', ],
        'borg.cache_sync': ['*.c', '*.h', '*.pyx', ],
    },
```
https://stackoverflow.com/questions/72363601/how-to-interpret-the-package-would-be-ignored-warning-generated-by-setuptools

So it seems that if one wants that warning to go away, one has to use `find_namespace_packages`, so setuptools "finds" the directories which are **not** python packages, but starts feeling good about it. WTF?

https://github.com/borgbackup/borg/pull/6937/commits/69f4898460668bdcc8e7ff46052717ae3416ee76

feels wrong somehow, but seems to "work".

Resolving patch:
diff --git a/src/borg/cache_sync/__init__.py b/src/borg/cache_sync/__init__.py
deleted file mode 100644
--- a/src/borg/cache_sync/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-dummy package init file to suppress this weird setuptools warning:
-
-$ pip install -v .  # note: does not happen with -ve .
-
-############################
-# Package would be ignored #
-############################
-Python recognizes 'borg.cache_sync' as an importable package,
-but it is not listed in the `packages` configuration of setuptools.
-
-'borg.cache_sync' has been automatically added to the distribution only
-because it may contain data files, but this behavior is likely to change
-in future versions of setuptools (and therefore is considered deprecated).
-
-Please make sure that 'borg.cache_sync' is included as a package by using
-the `packages` configuration field or the proper discovery methods
-(for example by using `find_namespace_packages(...)`/`find_namespace:`
-instead of `find_packages(...)`/`find:`).
-
-You can read more about "package discovery" and "data files" on setuptools
-documentation page.
-"""


Test patch: