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 <wqu@suse.com>
This commit is contained in:
Qu Wenruo 2024-09-21 10:34:56 +09:30
parent 79ce9b6512
commit 762c7e87de
2 changed files with 1 additions and 3 deletions

View File

@ -0,0 +1 @@
include btrfsutilpy.h

View File

@ -97,9 +97,6 @@ module = Extension(
'qgroup.c', 'qgroup.c',
'subvolume.c', 'subvolume.c',
], ],
headers=[
'btrfsutilpy.h'
],
include_dirs=['..'], include_dirs=['..'],
library_dirs=['../..'], library_dirs=['../..'],
libraries=['btrfsutil'], libraries=['btrfsutil'],