201 Commits

Author SHA1 Message Date
Douglas Eichelberger
d7d8f2cacb Revert language mixins back to module_function 2023-04-18 06:17:22 -07:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
David Baumgold
a62543f304 forgot splat 2023-04-01 13:36:58 +02:00
David Baumgold
5f51e1549c unless 2023-04-01 12:36:58 +02:00
David Baumgold
38a2703aa7 Python: allow --no-build-isolation for pip install 2023-04-01 11:31:29 +02:00
Douglas Eichelberger
02fd0422aa Enable typing in a few more files 2023-03-09 13:42:06 -08:00
Branch Vincent
db6d3156f2
python: reinstate pip's --no-binary 2022-12-19 23:25:53 -08:00
Tom Forbes
2c378249aa Allow pip to use the local wheel cache while installing dependencies 2022-12-10 15:00:42 +00:00
Michael Cho
776d6b934d
language/python: optionally link manpages 2022-12-08 17:03:59 -08: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
ab4f1047fb
language/python: use versioned Python name in detected_python_shebang
Needed for Homebrew/homebrew-core#107517.
2022-08-09 22:36:39 +08:00
Carlo Cabrera
c9af8a632d
language/python: add --install-lib to setup_install_args
About 25 formula in homebrew/core pass `--install-lib` to `python3` in
addition to `*setup_install_args` in order to ensure that all files are
installed into the formula's prefix rather than into a `site-packages`
directory in Python's keg.

Let's simplify these formulae by also adding the appropriate
`--install-lib` flag to `setup_install_args`.
2022-07-09 22:22:10 +08:00
Bo Anderson
40bbdc659e
Fix some Style/FetchEnvVar offences 2022-06-17 19:47:57 +01:00
Bo Anderson
4c4ed598df
language/node: also strip postpack 2022-06-14 08:56:04 +01:00
Carlo Cabrera
797c77761a
language/python: bug fix
Fixes a bug introduced in 09570fc7a66af8c43626a869888ebc484745c587.
2021-09-22 20:30:32 +08:00
Carlo Cabrera
09570fc7a6
language/python: allow formulae to restrict access to system site packages
Also, clean up one use of an `options` hash, because this is no longer
needed.

Closes #11885.
2021-09-21 13:21:26 +08:00
Mike McQuaid
b622c36be6
Add, use uses_from_macos_names.
This strips e.g. `:build` tags.
2021-09-14 09:48:19 +01:00
Bo Anderson
8dd11e4e4c
Set uses_from_macos_elements in all cases 2021-09-14 04:06:40 +01:00
Bo Anderson
861dea9ada
Bump various type strictnesses 2021-09-11 01:00:23 +01: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
Misty De Meo
c0a02442d9
Revert "language/java: use shortened brew paths"
This reverts commits 318175cfe2b23328f1b5f13812fd59cfd45fe1dc,
e7ab760392b9691a6c730b7e0d660b7874969e70 and
3b35af63f608438b1882756feca94a6ebdd0d6a3 (PR #11537).
2021-06-17 20:29:43 -07:00
Caleb Xu
3b35af63f6
language/java: use shortened brew paths 2021-06-15 09:59:20 -04:00
Bo Anderson
5f41016267
Support handling of rewriting shebangs with flags
Fixes #11108.
2021-05-10 06:13:58 +01:00
Bo Anderson
8db3c6bfd0
language/perl: use versioned shebang 2021-05-10 05:50:08 +01:00
Bo Anderson
728bb547a7
language: raise ShebangDetectionError rather than a generic error 2021-05-10 05:50:08 +01:00
Bo Anderson
20ff68a425
Fix brew style. 2021-03-17 20:45:44 +00:00
Rylan Polster
4c4dcfa3bb
language/python: remove outdated "homebrew-" resource handling 2021-03-14 14:17:02 -04:00
Dustin Rodrigues
c8e99e5185
python: stop passing no-user flag on installation 2021-02-19 12:49:10 -05:00
Jonathan Chang
d6bba1c493 java: fix java_home on macOS 2021-02-02 18:49:29 +11:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
Dustin Rodrigues
425535e32b python: add --no-user when doing pip install 2021-01-09 10:09:44 -05:00
Dustin Rodrigues
19a47d7c50 python: use built-in venv instead of virtualenv when installing formulae 2021-01-09 10:09:44 -05:00
Mike McQuaid
1171a3b8fe
Remove language/haskell
The referenced file no longer exists.
2020-12-21 09:29:55 +00:00
Rylan Polster
7f260f92b9 language/python: update homebrew-virtualenv resource 2020-12-12 14:24:58 -05:00
Francois-Xavier Coudert
0670ec4d09 python: update virtualenv 2020-12-02 09:54:18 +01:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Dustin Rodrigues
84de3c1eb6 python: allow multi-digit minor versions 2020-11-22 10:45:06 -05:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Dustin Rodrigues
0f3c4b1781
Merge pull request #9048 from dtrodrigues/npm-scripts
language/node: remove unneeded scripts prior to installation
2020-11-06 07:07:39 -05:00
Dustin Rodrigues
f9a15e7443
Update Library/Homebrew/language/node.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-11-06 06:40:50 -05:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
EricFromCanada
4f7719ac2e apidoc: update examples' syntax 2020-11-05 23:50:55 -05:00
Dustin Rodrigues
c062429ddd language/node: remove unneeded scripts prior to installation 2020-11-05 21:10:51 -05:00
FX Coudert
b4ad930b5d
python: update virtualenv 2020-10-30 18:04:54 +01:00
Diogo Azevedo
35a7e336be
node: add support for npm 7
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-10-24 15:26:36 +02:00
Markus Reiter
61b79318ed Move include Kernel into .rbi files again and split up existing .rbi files. 2020-10-10 19:10:58 +02:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Michka Popoff
ddc73ffa0c python: do not add main brewed Python site-package to virtualenv
If added, this makes the virtualenv read the main site-package from brewed Python,
and especially makes it read our sitecustomize.py file, which will
modify the sys.executable path.

See the full discussion at:
https://github.com/Homebrew/brew/pull/8873

I also took the opportunity to not include test deps, as these will
be not be installed, so the .pth file should not contains references
to site-packages from test deps.

Previous packages on Linux did already contain the wrong lines in the pth file,
for example:
cat /home/linuxbrew/.linuxbrew/Cellar/aws-google-auth/0.0.36_1/libexec/lib/python3.8/site-packages/homebrew_deps.pth
import site; site.addsitedir('/home/linuxbrew/.linuxbrew/opt/python@3.8/lib/python3.8/site-packages')
import site; site.addsitedir('/home/linuxbrew/.linuxbrew/opt/libxml2/lib/python3.8/site-packages')

This might have caused subtle bugs for some packages but not for others.
2020-10-08 19:03:51 +02:00