Deprecate Language::Python.setup_install_args
This method predates Python's standardized `pyproject.toml` build system, introduced in PEP 517 to allow for more build backends than just `setuptools`: https://peps.python.org/pep-0517/. Directly executing `setup.py` has since been deprecated in favor of using PEP 517 compliant installers, such as `pip`: https://packaging.python.org/en/latest/discussions/setup-py-deprecated/ In homebrew/core, our last remaining use is a single disabled formula. For third party taps, simply migrate to `std_pip_args`: ```ruby # Old system python3, *Language::Python.setup_install_args(libexec, python3) # New system python3, "-m", "pip", "install", *std_pip_args, "." ```
This commit is contained in:
parent
176720f75e
commit
859dbb074c
@ -1,11 +1,15 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "utils/output"
|
||||
|
||||
module Language
|
||||
# Helper functions for Python formulae.
|
||||
#
|
||||
# @api public
|
||||
module Python
|
||||
extend ::Utils::Output::Mixin
|
||||
|
||||
sig { params(python: T.any(String, Pathname)).returns(T.nilable(Version)) }
|
||||
def self.major_minor_version(python)
|
||||
version = `#{python} --version 2>&1`.chomp[/(\d\.\d+)/, 1]
|
||||
@ -84,6 +88,7 @@ module Language
|
||||
|
||||
sig { params(prefix: Pathname, python: T.any(String, Pathname)).returns(T::Array[String]) }
|
||||
def self.setup_install_args(prefix, python = "python3")
|
||||
# odeprecated "Language::Python.setup_install_args", "pip and `std_pip_args`"
|
||||
shim = <<~PYTHON
|
||||
import setuptools, tokenize
|
||||
__file__ = 'setup.py'
|
||||
|
Loading…
x
Reference in New Issue
Block a user