From 762c7e87deb07d899bfc594e621d21e639c00408 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Sat, 21 Sep 2024 10:34:56 +0930 Subject: [PATCH] btrfs-progs: libbtrfsutil/python: use MANIFEST.in for headers [BUG] Currently with python3.12, the python bindding will always result the following warning: [PY] libbtrfsutil /usr/lib/python3.12/site-packages/setuptools/_distutils/extension.py:134: UserWarning: Unknown Extension options: 'headers' warnings.warn(msg) [CAUSE] In the setup.py which specifies the files to be included into the package, we use setuptools::Extension to specify the file lists and include paths. But there is no handling of Extension::headers member, thus resulting the above warning. [FIX] According to the docs of setuptools, MANIFEST.in is the file controlling what files should be included. So instead of the non-supported headers, use MANIFEST.in to include the needed headers. Signed-off-by: Qu Wenruo --- libbtrfsutil/python/MANIFEST.in | 1 + libbtrfsutil/python/setup.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 libbtrfsutil/python/MANIFEST.in diff --git a/libbtrfsutil/python/MANIFEST.in b/libbtrfsutil/python/MANIFEST.in new file mode 100644 index 00000000..b613db8e --- /dev/null +++ b/libbtrfsutil/python/MANIFEST.in @@ -0,0 +1 @@ +include btrfsutilpy.h diff --git a/libbtrfsutil/python/setup.py b/libbtrfsutil/python/setup.py index e0ffb7c5..79c0b48d 100755 --- a/libbtrfsutil/python/setup.py +++ b/libbtrfsutil/python/setup.py @@ -97,9 +97,6 @@ module = Extension( 'qgroup.c', 'subvolume.c', ], - headers=[ - 'btrfsutilpy.h' - ], include_dirs=['..'], library_dirs=['../..'], libraries=['btrfsutil'],