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

No support for PEP 517 builds #499

Open
bnbourgade opened this issue Aug 27, 2024 · 3 comments
Open

No support for PEP 517 builds #499

bnbourgade opened this issue Aug 27, 2024 · 3 comments

Comments

@bnbourgade
Copy link

Hello,

I've been trying to install pyvips using poetry 1.8.2, and it fails, returning me the following error :

  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  

  at /usr/local/lib/python3.10/dist-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 pyvips (2.2.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyvips (==2.2.3)"'.

I've found a workaround using an older version of poetry, alongside installing some apt packages, but i would find an issue that uses the latest version of Poetry.

Thanks in advance !

@kleisauke
Copy link
Member

I think PR #445 will fix this.

$ pip3 install git+https://github.com/kleisauke/pyvips.git@pyproject-toml --use-pep517 --break-system-packages
[...]
Successfully built pyvips
Installing collected packages: pyvips
Successfully installed pyvips-2.2.3

@kleisauke
Copy link
Member

Actually, it seems that the underlying issue might be error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1. Is there a way to enable verbose build output in Poetry?

[...] You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyvips (==2.2.3)"'.

FWIW, the command mentioned here also works for me without any issues.

@kleisauke
Copy link
Member

... according to https://peps.python.org/pep-0517/, it should revert to the setup.py build if the pyproject.toml file is absent.

If the pyproject.toml file is absent, or the build-backend key is missing, the source tree is not using this specification, and tools should revert to the legacy behaviour of running setup.py (either directly, or by implicitly invoking the setuptools.build_meta:__legacy__ backend).

So, IIUC, pyvips should already be compatible with PEP 517.

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

No branches or pull requests

3 participants
@kleisauke @bnbourgade and others