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

btrfsutil Python package installation problem #964

Open
mhkarimi1383 opened this issue Mar 5, 2025 · 3 comments
Open

btrfsutil Python package installation problem #964

mhkarimi1383 opened this issue Mar 5, 2025 · 3 comments
Labels
python Python binding and packaging

Comments

@mhkarimi1383
Copy link

Hi we want to add btrfsutil as a dependency in our project using poetry (pyproject.toml) add getting

poetry add btrfsutil
Using version ^6.13 for btrfsutil

Updating dependencies
Resolving dependencies... (0.1s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing btrfsutil (6.13): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  running bdist_wheel
  running build
  running build_ext
  building 'btrfsutil' extension
  creating build/temp.linux-x86_64-cpython-311
  gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/fpv25ch2rim4w3chz1iwmsrvsv08qzzy-libxcrypt-4.4.36/include -fPIC -I.. -I/tmp/nix-shell-18144-0/tmp07s27ndm/.venv/include -I/nix/store/mh6gqjf1w1i6ln1a61psnz0gzdmwrspl-python3-3.11.8/include/python3.11 -c constants.c -o build/temp.linux-x86_64-cpython-311/constants.o
  constants.c:3:10: fatal error: btrfsutil.h: No such file or directory
      3 | #include <btrfsutil.h>
        |          ^~~~~~~~~~~~~
  compilation terminated.
  error: command '/nix/store/zd2viirgdm4ffgipgpslmysmlzs6fscb-gcc-wrapper-12.3.0/bin/gcc' failed with exit code 1
  

  at /nix/store/q98akaqr3mpr4l7gli1bi0phvx7r8h0y-python3.11-poetry-1.7.1/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with btrfsutil (6.13) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "btrfsutil (==6.13)"'.
@mhkarimi1383 mhkarimi1383 changed the title btrfsutil Python package PEP 517 build support btrfsutil Python package installation problem Mar 5, 2025
@mhkarimi1383
Copy link
Author

Fixed by installing btrfs-progs in my shell

@kdave kdave added the python Python binding and packaging label Mar 5, 2025
@kdave
Copy link
Owner

kdave commented Mar 5, 2025

The file btrfsutil.h is part of libbtrfsutil, so it would be probably ok to install just the devel package of that. Should this dependency be mentioned somewhere in the python package metdata?

@mhkarimi1383
Copy link
Author

Some others are building/installing required things while installing the package, to fix the version problem for example, If distro version mismatch the version from pipy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Python binding and packaging
Projects
None yet
Development

No branches or pull requests

2 participants