Merge pull request #20554 from branchvincent/setup_install_args

Deprecate `Language::Python.setup_install_args`
This commit is contained in:
Mike McQuaid 2025-08-23 19:48:50 +00:00 committed by GitHub
commit a7b852014a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,11 +1,15 @@
# typed: strict # typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "utils/output"
module Language module Language
# Helper functions for Python formulae. # Helper functions for Python formulae.
# #
# @api public # @api public
module Python module Python
extend ::Utils::Output::Mixin
sig { params(python: T.any(String, Pathname)).returns(T.nilable(Version)) } sig { params(python: T.any(String, Pathname)).returns(T.nilable(Version)) }
def self.major_minor_version(python) def self.major_minor_version(python)
version = `#{python} --version 2>&1`.chomp[/(\d\.\d+)/, 1] 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]) } sig { params(prefix: Pathname, python: T.any(String, Pathname)).returns(T::Array[String]) }
def self.setup_install_args(prefix, python = "python3") def self.setup_install_args(prefix, python = "python3")
# odeprecated "Language::Python.setup_install_args", "pip and `std_pip_args`"
shim = <<~PYTHON shim = <<~PYTHON
import setuptools, tokenize import setuptools, tokenize
__file__ = 'setup.py' __file__ = 'setup.py'