From 449b02742f9dbb4d366fbd0c9f5fca3c77e82cd7 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 4 Aug 2022 17:18:23 +0200 Subject: [PATCH] make setuptools happy, fixes #6874 (try 2, same as in 1.2-maint) work around setuptools puking about: ############################ # 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. --- setup.cfg | 2 +- src/borg/cache_sync/__init__.py | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 src/borg/cache_sync/__init__.py diff --git a/setup.cfg b/setup.cfg index a4f2d8e4b..a62c9d665 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ project_urls = Source Code = https://github.com/borgbackup/borg [options] -packages = find: +packages = find_namespace: package_dir = =src python_requires = >=3.9 diff --git a/src/borg/cache_sync/__init__.py b/src/borg/cache_sync/__init__.py deleted file mode 100644 index cb2d1a50f..000000000 --- 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. -"""