Skip to content

Commit

Permalink
btrfs-progs: libbtrfsutil: use package_data member for header files
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]
Not an expert in python, but other packages like cffi are all using
`package_data` to include the headers, so just follow them to use
`package_data` member for headers.

Fixes: 87c3fb5 ("libbtrfsutil: update python setup.py for distribution")
Signed-off-by: Qu Wenruo <wqu@suse.com>
  • Loading branch information
adam900710 committed Sep 20, 2024
1 parent 8e3157c commit ef82e57
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 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 All @@ -113,6 +110,7 @@ def run(self):
description='Library for managing Btrfs filesystems',
long_description=open('../README.md').read(),
long_description_content_type='text/markdown',
package_data = { "btrfstuil" : [ "btrfsutilpy.h" ] },
url='https://github.com/kdave/btrfs-progs',
license='LGPLv2+',
cmdclass={'build_ext': my_build_ext},
Expand Down

0 comments on commit ef82e57

Please sign in to comment.