mbox series

[0/3] btrfs-progs: libbtrfsutil/python: fix all the warnings

Message ID cover.1726885304.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: libbtrfsutil/python: fix all the warnings | expand

Message

Qu Wenruo Sept. 21, 2024, 2:26 a.m. UTC
There are the following warnings when building the python binding the
proper way (directly calling "setup.py build" is no longer recommended):

 $ python -m build btrfs-progs/libbtrfsutil/python
 * Creating isolated environment: venv+pip...
 * Installing packages in isolated environment:
   - setuptools >= 40.8.0
 * Getting build dependencies for sdist...
 /tmp/build-env-2u6q_udl/lib/python3.12/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
   warnings.warn(msg)
 * Building sdist...
 /tmp/build-env-2u6q_udl/lib/python3.12/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
   warnings.warn(msg)
 writing manifest file 'btrfsutil.egg-info/SOURCES.txt'
 warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md

This patch fixes them by:

- Use MANIFEST.in to properly include the "btrfsutilpy.h"
- Remove unnecessary build options for C files
- Reuse the existing README.md by a softlink
  So that even in a virtual environment the README.md will still be
  properly copied.

TODO: Migrate the "python setup.py build" system to "python -m build"
for building and tox for tests.

Qu Wenruo (3):
  btrfs-progs: libbtrfsutil/python: use MANIFEST.in for headers
  btrfs-progs: libbtrfsutil/python: remove unnecessary build options
  btrfs-progs: libbtrfsutil/python: reuse existing README.md for long
    description

 libbtrfsutil/python/MANIFEST.in | 1 +
 libbtrfsutil/python/README.md   | 1 +
 libbtrfsutil/python/setup.py    | 7 ++-----
 3 files changed, 4 insertions(+), 5 deletions(-)
 create mode 100644 libbtrfsutil/python/MANIFEST.in
 create mode 120000 libbtrfsutil/python/README.md

--
2.46.1