Skip to content
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

[email protected]: make keg-only #86469

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class PythonTkAT310 < Formula
url "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz"
sha256 "c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758"
license "Python-2.0"
revision 1

livecheck do
formula "[email protected]"
Expand All @@ -18,6 +19,8 @@ class PythonTkAT310 < Formula
sha256 x86_64_linux: "33e5057494f2cbbeba821221aa97de4c3729c825cf2f47e583081d5bff55267b"
end

keg_only :versioned_formula

depends_on "[email protected]"
depends_on "tcl-tk"

Expand Down
27 changes: 5 additions & 22 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class PythonAT310 < Formula
url "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz"
sha256 "c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758"
license "Python-2.0"
revision 1

livecheck do
url "https://www.python.org/ftp/python/"
Expand All @@ -23,6 +24,8 @@ class PythonAT310 < Formula
# build packages later. Xcode-only systems need different flags.
pour_bottle? only_if: :clt_installed

keg_only :versioned_formula

depends_on "pkg-config" => :build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, does this have OpenSSL 1.1 in its dep tree other than through here? If so we should use OpenSSL 3.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't use OpenSSL 3.0 until it or 1.1 is keg only, or we're just going to reintroduce the problem #86520 is having.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also that person was probably right in saying we should avoid anything too important while that old macOS build issue is still a thing.

depends_on "gdbm"
depends_on "mpdecimal"
Expand All @@ -42,21 +45,6 @@ class PythonAT310 < Formula
skip_clean "bin/easy_install3", "bin/easy_install-3.4", "bin/easy_install-3.5", "bin/easy_install-3.6",
"bin/easy_install-3.7", "bin/easy_install-3.8", "bin/easy_install-3.9"

link_overwrite "bin/2to3"
link_overwrite "bin/idle3"
link_overwrite "bin/pip3"
link_overwrite "bin/pydoc3"
link_overwrite "bin/python3"
link_overwrite "bin/python3-config"
link_overwrite "bin/wheel3"
link_overwrite "share/man/man1/python3.1"
link_overwrite "lib/pkgconfig/python3.pc"
link_overwrite "lib/pkgconfig/python3-embed.pc"
link_overwrite "Frameworks/Python.framework/Headers"
link_overwrite "Frameworks/Python.framework/Python"
link_overwrite "Frameworks/Python.framework/Resources"
link_overwrite "Frameworks/Python.framework/Versions/Current"

resource "setuptools" do
url "https://files.pythonhosted.org/packages/1e/5c/3d7b3d91a86d71faf5038c5d259ed36b5d05b7804648e2c43251d574a6e6/setuptools-58.2.0.tar.gz"
sha256 "2c55bdb85d5bb460bd2e3b12052b677879cffcf46c0c688f2e5bf51d36001145"
Expand Down Expand Up @@ -347,11 +335,6 @@ def post_install
(libexec/"bin").install_symlink (bin/versioned_name).realpath => unversioned_name
end

# post_install happens after link
%W[pip3 wheel3 pip#{version.major_minor}].each do |e|
(HOMEBREW_PREFIX/"bin").install_symlink bin/e
end

# Help distutils find brewed stuff when building extensions
include_dirs = [HOMEBREW_PREFIX/"include", Formula["[email protected]"].opt_include,
Formula["sqlite"].opt_include]
Expand Down Expand Up @@ -424,14 +407,14 @@ def sitecustomize
def caveats
<<~EOS
Python has been installed as
#{HOMEBREW_PREFIX}/bin/python3
#{opt_bin}/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
#{opt_libexec}/bin

You can install Python packages with
pip3 install <package>
#{opt_bin}/pip3 install <package>
They will install into the site-package directory
#{HOMEBREW_PREFIX/"lib/python#{version.major_minor}/site-packages"}

Expand Down
2 changes: 0 additions & 2 deletions audit_exceptions/versioned_keg_only_allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
"[email protected]",
"pyqt@5",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]"
]