Skip to content

Commit b11c0ee

Browse files
authored
pipenv: fix python3 references. (Homebrew#109663)
1 parent 1747027 commit b11c0ee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Formula/pipenv.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ class Pipenv < Formula
4949
sha256 "418ee935c36152f8f153c79824bb93eaf6f0f7984bae31d3f48f350b9183501a"
5050
end
5151

52+
def python3
53+
"python3.10"
54+
end
55+
5256
def install
5357
# Using the virtualenv DSL here because the alternative of using
5458
# write_env_script to set a PYTHONPATH breaks things.
5559
# https://github.com/Homebrew/homebrew-core/pull/19060#issuecomment-338397417
56-
venv = virtualenv_create(libexec, "python3")
60+
venv = virtualenv_create(libexec, python3)
5761
venv.pip_install resources
5862
venv.pip_install buildpath
5963

@@ -87,7 +91,7 @@ def post_install
8791
test do
8892
ENV["LC_ALL"] = "en_US.UTF-8"
8993
assert_match "Commands", shell_output("#{bin}/pipenv")
90-
system "#{bin}/pipenv", "--python", Formula["python@3.10"].opt_bin/"python3"
94+
system "#{bin}/pipenv", "--python", which(python3)
9195
system "#{bin}/pipenv", "install", "requests"
9296
system "#{bin}/pipenv", "install", "boto3"
9397
assert_predicate testpath/"Pipfile", :exist?

0 commit comments

Comments
 (0)