-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Poetry formula updates its own virtualenv when using it inside a project #48883
Comments
It seems homebrew-core/Formula/poetry.rb Lines 169 to 182 in 8cb3662
I've tried to change the installation to using |
I think something like this is necessary for some modules. This is taken from the flake8 formula. I tried this myself, but I didn't succeed with it. So, this is no easy solution but just a hint. def install
venv = virtualenv_create(libexec, "python3")
resource("entrypoints").stage do
# Without removing this file, `pip` will ignore the `setup.py` file and
# attempt to download the [`flit`](https://github.com/takluyver/flit)
# build system.
rm_f "pyproject.toml"
venv.pip_install Pathname.pwd
end
(resources.map(&:name).to_set - ["entrypoints"]).each do |r|
venv.pip_install resource(r)
end
venv.pip_install_and_link buildpath
end |
@oliverandrich I think we didn't go with the |
Sounds reasonable. May it would be a good idea to remove the formula for the time being. At least one of my team members corrupted a project. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
Create a new python project using the poetry tool from the formula poetry.
What happened (include command output)
The creation of the fresh project works, but calling
poetry install
does not install packages into the fresh projects, but some packages are updated inside the virtualenv of poetry itself. This is a bug, cause a project should not update the virtualenv of the tool used. A poetry installed via pipx does not behave like that.Command output
What you expected to happen
What I expect is, that the formula based poetry behaves like a pipx-installed poetry or like a poetry installed with the official installer. Here is an output of the same command sequence. You can easily see the difference on the first 5 or 6 commands. Here the project is isolated and the files are installed inside the actual virtualenv of the project and no updates occur in the virtualenv of the formula.
Command output
Step-by-step reproduction instructions (by running
brew install
commands)Output of
brew config
andbrew doctor
commandsThe text was updated successfully, but these errors were encountered: