25 Commits

Author SHA1 Message Date
botantony
dac4b6fd56
shebangs: fix broken shebangs like #!python
Signed-off-by: botantony <antonsm21@gmail.com>
2025-03-21 00:34:14 +01:00
Douglas Eichelberger
ca8759605c
Fix tests 2025-02-24 10:23:42 -08:00
Michael Cho
c2d3f126ed
language/python: link manpages by default 2024-11-05 11:24:13 -05:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Michael Cho
ecb7daba58
language/python: order args for virtualenv_install_with_resources
Add `without`, `start_with`, and `end_with` to allow basic control over
the order that resources are installed so that the situations where we
have to split up `virtualenv_install_with_resources` is reduced.

Co-authored-by: Kevin <apainintheneck@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-14 22:21:32 -04:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Sam Ford
4314daa2cf
python: expand and refactor tests
This brings coverage of `Language::Python::Shebang` to 100%.
2023-08-15 00:53:41 -04:00
Branch Vincent
98323cd7e6
python: create venv's --without-pip 2023-07-31 08:51:47 -07:00
Branch Vincent
9597f455aa
formula: add std_pip_args 2023-07-19 20:02:47 -07:00
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
Douglas Eichelberger
df5c5842cc Fix tests 2023-04-17 11:30:12 -07:00
David Baumgold
64ff386744 fix tests 2023-04-01 14:32:27 +02:00
David Baumgold
38a2703aa7 Python: allow --no-build-isolation for pip install 2023-04-01 11:31:29 +02:00
Douglas Eichelberger
21b4251a67 Resolve language/python/virtualenv_spec violation 2023-01-22 17:26:44 -08:00
Branch Vincent
db6d3156f2
python: reinstate pip's --no-binary 2022-12-19 23:25:53 -08:00
Tom Forbes
173e6bf1d3 Fix tests 2022-12-10 15:02:18 +00:00
Michael Cho
776d6b934d
language/python: optionally link manpages 2022-12-08 17:03:59 -08:00
Mike McQuaid
59f4b5226a
tests: test on Ubuntu 18.04. 2022-11-09 14:45:43 +00:00
Carlo Cabrera
98a53e4781
language/python: support python3 from PATH in #detected_python_shebang
Some formulae are flexible about the version of Python3 that they use.
However, when we use `#detected_python_shebang` on these formulae, they
become coupled to the specific version of Python3 declared in the
formula.

This is harmful because
1. it prevents us from using `uses_from_macos "python"` even in formulae
   where we should be able to
2. it forces us to rebuild the formula whenever we make changes to the
   Python dependency when nothing but the shebang would have changed as
   a consequence of the rebuild

For an example of this, see Homebrew/homebrew-core#107905.

I'd also like to do this to get rid of some really terrible hacks we
have in `glib-utils` as a means of decoupling `glib` from the specific
versioned Python dependency it used to have.

See Homebrew/homebrew-core#103916, or Homebrew/homebrew-core#106045 for
a proposal to give the same treatment to `gobject-introspection`.
2022-08-13 01:11:09 +08:00
Carlo Cabrera
6d07c6eaa0
tests: update language/python/shebang spec 2022-08-09 22:38:05 +08:00
Carlo Cabrera
3d3b9874f9
language/python: create venvs with access to system site packages
A user may wish to use two use two brew-installed Python packages
together. For example, one might want to `import numpy` when using
`jupyterlab` or `ptpython`.

Currently, the only ways to do this I'm aware of is with some hacking of
`PYTHONPATH` or the creation of `.pth` files in a formula's prefix.

A better solution is to allow the virtualenvs that `brew` creates to
have access to system site-packages by default, so that `import numpy`
inside `ptpython` or `jupyterlab` just works.

Partially resolves Homebrew/homebrew-core#76950.
2021-06-28 03:20:03 +01:00
Dustin Rodrigues
c8e99e5185
python: stop passing no-user flag on installation 2021-02-19 12:49:10 -05:00
Rylan Polster
d5d7b6c3db
style: remove RSpec/MultipleDescribes violations
Co-authored-by: Nanda H Krishna <nanda.harishankar@gmail.com>
2021-02-01 20:30:51 -05:00