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

poetry: invoke poetry.console.main instead of using env_script_all_files #51121

Closed
wants to merge 1 commit into from
Closed

poetry: invoke poetry.console.main instead of using env_script_all_files #51121

wants to merge 1 commit into from

Conversation

dlh
Copy link
Contributor

@dlh dlh commented Mar 4, 2020

Poetry interfaces with virtualenvs, and when PYTHONPATH is set it does not operate correctly.

Our bin/poetry is now functionally the same as the official poetry distribution's bin/poetry.

Relates to #50673, #48883, and python-poetry/poetry#1929.

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

I've attached 2 files that show the behavior of poetry add.

  • With the current formula, poetry add reports this for the 2 invocations:
Package operations: 5 installs, 11 updates, 0 removals
[...]
Package operations: 6 installs, 16 updates, 0 removals
  • With the updated formula in this pull request, poetry add reports this:
Package operations: 16 installs, 0 updates, 0 removals
[...]
Package operations: 6 installs, 0 updates, 0 removals

Note in the current formula, all package are incorrectly updated when the 2nd add is run (poetry add boto3), and some packages are also being incorrectly installed from the vendor'ed lib directory. Additionally, poetry install in the current formula will always re-install every dependency.

This pull request fixes the issue.

current-behavior.txt
fixed-behavior.txt

Poetry interfaces with virtualenvs, and when PYTHONPATH is set it does not
operate correctly.

Our `bin/poetry` is now functionally the same as the official poetry
distribution's `bin/poetry`.

Relates to #50673, and python-poetry/poetry#1929.
@Bo98
Copy link
Member

Bo98 commented Mar 5, 2020

Makes sense to me. Seems like a bit of a hack at first with the sys.path stuff but it looks like upstream does exactly the same thing.

@Bo98 Bo98 closed this in 5179b9a Mar 5, 2020
ashnewmanjones pushed a commit to ashnewmanjones/homebrew-core that referenced this pull request Mar 7, 2020
Poetry interfaces with virtualenvs, and when PYTHONPATH is set it does not
operate correctly.

Our `bin/poetry` is now functionally the same as the official poetry
distribution's `bin/poetry`.

Relates to Homebrew#50673, and python-poetry/poetry#1929.

Closes Homebrew#51121.

Signed-off-by: Bo Anderson <[email protected]>
@lock lock bot added the outdated PR was locked due to age label Apr 4, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants