-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Virtualenv.do_install does not work for various Python packages #6200
Comments
@adamtheturtle In future please amend the existing issue and comment rather than opening multiple issues, thanks.
You can check the commit logs, they may provide some enlightenment there.
We are unlikely to remove this unless it's needed for Homebrew/homebrew-core formula. It may be a better option for your formula to do the same underlying steps done by Closing this but can continue discussion here, thanks! |
Will do.
I may be missing something but I believe the commit at 2783ade#diff-86d78c9fcb1fe847e0ef982ea0b5adfd added this option without description.
That's fair, and your suggestion is what many folks are doing, as shown by the linked issues to the However, as a formula author this is a shame because it used to be so easy! Hopefully the Thank you for your response @MikeMcQuaid ! |
Yes. @tdsmith or @jonchang @lembacon any thoughts on this commit and issue? |
For anyone following, I tried @MikeMcQuaid 's suggestion. Instead, I replaced my formula's def install
wanted = %w[python python@2 python2 python3 python@3 pypy pypy3].select {{ |py| needs_python?(py) }}
raise FormulaAmbiguousPythonError, self if wanted.size > 1
python = wanted.first || "python2.7"
python = "python3" if python == "python"
venv = virtualenv_create(libexec, python.delete("@"))
venv.instance_variable_get(:@formula).system venv.instance_variable_get(:@venv_root)/"bin/pip", "install",
"-v", "--no-deps",
"--ignore-installed",
"--upgrade",
"--force-reinstall",
"pip<19"
venv.pip_install resources
venv.pip_install_and_link buildpath
venv
end |
Passing |
Yeah, avoiding precompiled binaries was the goal, in keeping with the build-from-source ethos. I'm not sure whether Homebrew can do something clever here. I'm moving today (on truck-watch duty atm!) -- I can try and take a look later this week, but if someone else has any interest in investigating, don't wait for me :) |
Thanks all! |
Thank you from me as well for spending the time on this. Perhaps I misunderstood - I am by no means a packaging expert - but I understood from Building from Source in Homebrew and Chocolatey that build from source is not necessarily the direction that Homebrew is going in. (No need to spend time correcting me as I haven't done thorough research on this). |
We build our own packages from source but distribute them as binaries. This is differentiated from distributing upstream binaries (which is done by |
More context on where |
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I am a maintainer of an application which ships a Homebrew recipe so that users can easily install a CLI on macOS.
The application is written in Python 3.
The application has multiple dependencies.
The recipe has the following layout, but with many more resources:
minidcos.rb
:Some of those resources specify a custom
build-backend
in their[build-system]
section in theirpyproject.toml
.There is a
pip
bug which prevents these packages from installing with--no-binary :all:
.Homebrew's
Virtualenv.do_install
usespip
's--no-binary :all:
option:brew/Library/Homebrew/language/python.rb
Lines 260 to 264 in 6b2dbbc
It is not clear to me why
--no-binary :all:
is used in Homebrew, so I don't want to just say "Homebrew would be better without this option". Perhaps this is a philosophical decision.However, links on that
pip
issue show that folks are using workarounds to avoid using--no-binary all
.My hope is that either this option can be removed, or there can be an easy option for recipe maintainers to avoid
--no-binary :all:
.What happened (include command output)
Command output
What you expected to happen
No error.
Step-by-step reproduction instructions (by running
brew
commands)Create the following file
minidcos.rb
.Run
brew install minidcos.rb
.brew configuration
The text was updated successfully, but these errors were encountered: