Skip to content

Commit

Permalink
[email protected]: make keg-only
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Oct 5, 2021
1 parent 5c8f716 commit ee55f83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
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
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
1 change: 0 additions & 1 deletion audit_exceptions/versioned_keg_only_allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"[email protected]",
"pyqt@5",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]"
Expand Down

0 comments on commit ee55f83

Please sign in to comment.