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

How to pass --no-use-pep517 to a particular dependency #3433

Closed
2 tasks done
mgresko opened this issue Nov 30, 2020 · 11 comments
Closed
2 tasks done

How to pass --no-use-pep517 to a particular dependency #3433

mgresko opened this issue Nov 30, 2020 · 11 comments
Labels
kind/feature Feature requests/implementations

Comments

@mgresko
Copy link

mgresko commented Nov 30, 2020

Is there a way to specify pip install flags for a particular package? Specifically --no-use-pep517

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Issue

@sinoroc
Copy link

sinoroc commented Nov 30, 2020

As far as I know, you can't.


Why? What is failing? Is that a public project?

@mgresko
Copy link
Author

mgresko commented Nov 30, 2020

snowflakedb/snowflake-connector-python#382

This is the issue. Building pyarrow on alpine fails.

@sinoroc
Copy link

sinoroc commented Nov 30, 2020

Pyarrow seems to have a correct pyproject.toml, so I am not sure deactivating the build isolation would make a change. Would it?

@mgresko
Copy link
Author

mgresko commented Nov 30, 2020

Disabling the build isolation does fix the issue if I try pip install --no-use-pep517 snowflake-connector-python

@kriansa
Copy link

kriansa commented Mar 7, 2021

Are there plans to add support to that? What's the official poetry's take on this issue?

@nikneroz
Copy link

@mgresko @kriansa

poetry add snowflake-connector-python
poetry run python -m pip install snowflake-connector-python --no-use-pep517
poetry install

@lars20070
Copy link

lars20070 commented Aug 17, 2022

On Apple M1 silicon, flags are required for the installation of numpy. Support for flags in pyproject.toml would be helpful indeed.

poetry run python -m pip install --no-use-pep517 --no-binary :all: numpy

Or is there an alternative way to add numpy to poetry projects on Apple M1 silicon?

@gianfa
Copy link

gianfa commented Nov 23, 2022

I don't know if it is too late, but if the problem is only with PEP517 this may help

You have to disable the experimental.new-installer configuration of poetry.
If you want to do this locally, you can make use of poetry.toml, not to be confused with pyproject.toml.
Just open a terminal in the project folder you are interested in (the one with "old" dependencies that won't install), run
poetry config experimental.new-installer false --local and it will generate the file.

more info: https://python-poetry.org/blog/announcing-poetry-1.2.0/#usefulness-of-experimentalnew-installer-false

@neersighted
Copy link
Member

This is not something we aim to solve in Poetry; building packages in the destination environment is problematic (as said packages may install different packages/versions from what Poetry is setting up, and installing random packages/changing the setuptools version during a parallel install is fraught and has caused a massive support burden in the past).

Poetry is going to insist on requiring that packages build in an isolated environment -- all that is necessary is properly declaring their build-time dependencies. This has been best practice since before PEP 517 (as the setup_requires argument to setup()), and is made simpler with the declarative build-system.requires in pyproject.toml.

@shicholas
Copy link

This Stack Overflow question may help too - https://stackoverflow.com/a/65726731/898952

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

8 participants