Skip to content

Commit

Permalink
btrfs-progs: libbtrfsutil/python: use MANIFEST.in for headers
Browse files Browse the repository at this point in the history
[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 <[email protected]>
  • Loading branch information
adam900710 committed Sep 21, 2024
1 parent 79ce9b6 commit 762c7e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions libbtrfsutil/python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include btrfsutilpy.h
3 changes: 0 additions & 3 deletions libbtrfsutil/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ def run(self):
'qgroup.c',
'subvolume.c',
],
headers=[
'btrfsutilpy.h'
],
include_dirs=['..'],
library_dirs=['../..'],
libraries=['btrfsutil'],
Expand Down

0 comments on commit 762c7e8

Please sign in to comment.