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

installing with pip3 errors out #507

Closed
callegar opened this issue May 24, 2020 · 3 comments
Closed

installing with pip3 errors out #507

callegar opened this issue May 24, 2020 · 3 comments

Comments

@callegar
Copy link

I understand that this is wanted to workaround other bugs, but
pip3 install --user retext errors producing pages of debug info, to then say

File "/tmp/pip-install-f_n60ljf/retext/setup.py", line 91, in run
      raise RuntimeError("Building wheels is disabled, because it breaks .desktop"
  RuntimeError: Building wheels is disabled, because it breaks .desktop files. See issues #452 and #497 for details.
  ----------------------------------------
  ERROR: Failed building wheel for retext
  Running setup.py clean for retext
Failed to build retext

but finally conclude

Installing collected packages: retext
    Running setup.py install for retext ... done
Successfully installed retext-7.1.0

after which retext seems to be working.
This is extremely confusing. If not building wheels is the desired outcome, can the exception be avoided or caught?

@mitya57
Copy link
Member

mitya57 commented May 24, 2020

Unfortunately, raising an exception is the only way to prevent pip from building the wheel.
After building wheel fails, pip falls back to setup.py install, which works absolutely fine.

I can add some text that this error should be ignored. Do you think it will be better?

@callegar
Copy link
Author

Yes, I think that would be useful, otherwise, one will always be unsure on whether the install has succeeded or not.
Out of curiosity, is there a pip bug for this? Seems strange that a package has no way to control whether its setup should involve building a wheel or not.

@mitya57
Copy link
Member

mitya57 commented May 25, 2020

Unfortunately, the approach we are using is “double legacy”. First, pip does not find pyproject.toml defined in PEP 517 and falls back to calling setup.py directly. Second, building a wheel fails and it falls back to setup.py install. I doubt that pip developers will add an option to force this behavior, and I know that they want to get rid of it (see pypa/pip#8102 or this comment). And definitely sticking to it is not a long-term solution.

Instead, I think pip should pass the installation paths as PEP 517 config_settings, then I will be able to teach our build system to use them for writing the desktop file. This is discussed in pypa/pip#5771 and pypa/pip#2677.

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

2 participants