Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs-progs: libbtrfsutil: reuse existing README.md for long description #895

Closed
wants to merge 2 commits into from

Conversation

adam900710
Copy link
Collaborator

This mostly reverts the commit 8f1f2e7 ("libbtrfsutil: update btrfsutil long description").

There is no need to introduce such a drama to create a temporary pypi-README.md, just reuse the existing one in libbtrfsutil/README.md.

This does not only make the code simpler, but pass CI.

Issue: #310
Fixes: 8f1f2e7 ("libbtrfsutil: update btrfsutil long description")

kdave and others added 2 commits September 19, 2024 01:51
Provide at least basic description of the library for pypi.org main
page. It's for libbtrfsutil that mentions the C and python usage.

[ ci skip ]

Issue: kdave#310
Signed-off-by: David Sterba <[email protected]>
This mostly reverts the commit 8f1f2e7 ("libbtrfsutil: update
btrfsutil long description").

There is no need to introduce such a drama to create a temporary
pypi-README.md, just reuse the existing one in libbtrfsutil/README.md.

This does not only make the code simpler, but pass CI.

Issue: kdave#310
Fixes: 8f1f2e7 ("libbtrfsutil: update btrfsutil long description")
Signed-off-by: Qu Wenruo <[email protected]>
@adam900710 adam900710 self-assigned this Sep 20, 2024
@adam900710 adam900710 added bug python Python binding and packaging labels Sep 20, 2024
@adam900710 adam900710 added this to the v6.11.1 milestone Sep 20, 2024
@adam900710 adam900710 added the build Changes in build system label Sep 20, 2024
@kdave
Copy link
Owner

kdave commented Sep 20, 2024

Have you tried building the python package? Relative paths don't work because the package is built out of git. For the same reason the VERSION can't be read automatically.

@kdave kdave closed this Sep 20, 2024
@kdave kdave reopened this Sep 20, 2024
@kdave
Copy link
Owner

kdave commented Sep 20, 2024

* Getting build dependencies for wheel...
/tmp/build-env-8mzpg7zc/lib64/python3.11/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
  warnings.warn(msg)
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
    main()
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
    return hook(config_settings)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-8mzpg7zc/lib64/python3.11/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/build-env-8mzpg7zc/lib64/python3.11/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
    self.run_setup()
  File "/tmp/build-env-8mzpg7zc/lib64/python3.11/site-packages/setuptools/build_meta.py", line 503, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/tmp/build-env-8mzpg7zc/lib64/python3.11/site-packages/setuptools/build_meta.py", line 318, in run_setup
    exec(code, locals())
  File "<string>", line 114, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '../README.md'

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

@adam900710
Copy link
Collaborator Author

The other solution would be just add a softlink, so the build system can work with the same README.md

@adam900710
Copy link
Collaborator Author

BTW, the current libbtrfsutils python binding fails to build if using proper python -m build command.

* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools >= 40.8.0
* Getting build dependencies for sdist...
/tmp/build-env-mwmlj9nz/lib/python3.12/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
  warnings.warn(msg)
running egg_info
writing btrfsutil.egg-info/PKG-INFO
writing dependency_links to btrfsutil.egg-info/dependency_links.txt
writing top-level names to btrfsutil.egg-info/top_level.txt
reading manifest file 'btrfsutil.egg-info/SOURCES.txt'
writing manifest file 'btrfsutil.egg-info/SOURCES.txt'
* Building sdist...
/tmp/build-env-mwmlj9nz/lib/python3.12/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
  warnings.warn(msg)
running sdist
running egg_info
writing btrfsutil.egg-info/PKG-INFO
writing dependency_links to btrfsutil.egg-info/dependency_links.txt
writing top-level names to btrfsutil.egg-info/top_level.txt
reading manifest file 'btrfsutil.egg-info/SOURCES.txt'
writing manifest file 'btrfsutil.egg-info/SOURCES.txt'
running check
creating btrfsutil-6.11
creating btrfsutil-6.11/btrfsutil.egg-info
creating btrfsutil-6.11/tests
copying files to btrfsutil-6.11...
copying README.md -> btrfsutil-6.11
copying constants.c -> btrfsutil-6.11
copying error.c -> btrfsutil-6.11
copying filesystem.c -> btrfsutil-6.11
copying module.c -> btrfsutil-6.11
copying qgroup.c -> btrfsutil-6.11
copying setup.py -> btrfsutil-6.11
copying subvolume.c -> btrfsutil-6.11
copying btrfsutil.egg-info/PKG-INFO -> btrfsutil-6.11/btrfsutil.egg-info
copying btrfsutil.egg-info/SOURCES.txt -> btrfsutil-6.11/btrfsutil.egg-info
copying btrfsutil.egg-info/dependency_links.txt -> btrfsutil-6.11/btrfsutil.egg-info
copying btrfsutil.egg-info/top_level.txt -> btrfsutil-6.11/btrfsutil.egg-info
copying tests/test_filesystem.py -> btrfsutil-6.11/tests
copying tests/test_qgroup.py -> btrfsutil-6.11/tests
copying tests/test_subvolume.py -> btrfsutil-6.11/tests
copying btrfsutil.egg-info/SOURCES.txt -> btrfsutil-6.11/btrfsutil.egg-info
Writing btrfsutil-6.11/setup.cfg
Creating tar archive
removing 'btrfsutil-6.11' (and everything under it)
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - setuptools >= 40.8.0
* Getting build dependencies for wheel...
/tmp/build-env-f4045nwn/lib/python3.12/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
  warnings.warn(msg)
running egg_info
writing btrfsutil.egg-info/PKG-INFO
writing dependency_links to btrfsutil.egg-info/dependency_links.txt
writing top-level names to btrfsutil.egg-info/top_level.txt
reading manifest file 'btrfsutil.egg-info/SOURCES.txt'
writing manifest file 'btrfsutil.egg-info/SOURCES.txt'
* Building wheel...
/tmp/build-env-f4045nwn/lib/python3.12/site-packages/setuptools/_distutils/extension.py:139: UserWarning: Unknown Extension options: 'headers'
  warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'btrfsutil' extension
creating build/temp.linux-x86_64-cpython-312
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I.. -I/tmp/build-env-f4045nwn/include -I/usr/include/python3.12 -c constants.c -o build/temp.linux-x86_64-cpython-312/constants.o
constants.c:4:10: fatal error: btrfsutilpy.h: No such file or directory
    4 | #include "btrfsutilpy.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/lib/ccache/bin/gcc' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

So the python binding from the very beginning is cursed, so is the build command.

@adam900710
Copy link
Collaborator Author

Closed for a more proper fix for the build system.

@adam900710 adam900710 closed this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build Changes in build system libbtrfsutil python Python binding and packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants