forked from divad12/khan-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove all vestiges of python2 from khan-dotfiles. (#101)
## Summary: We no longer use python2 anywhere! (Well, we still use it in one place: `make topic-icons`, anyone who wants to run that will now need to install python2 manually.) Let's remove it from khan-dotfiles. That simplifies the dotfiles a fair bit, and also simplifies the users' dev experience since the virtualenv was causing problems. I did this by running `git grep -e 'python[^3]' -e 'virtualenv'` and deleting anything that looked no longer relevant. Issue: https://khanacademy.atlassian.net/browse/INFRA-9771 ## Test plan: TODO -- will need to test on new installs of both mac and linux, and I have no idea how to do that! Author: csilvers Reviewers: dbraley, csilvers, #infra-platform Required Reviewers: Approved By: dbraley Checks: Pull Request URL: #101
- Loading branch information
Showing
15 changed files
with
8 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,3 @@ os-install: | |
|
||
common-install: | ||
./setup.sh | ||
|
||
virtualenv: | ||
./bin/rebuild_virtualenv.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,17 +153,6 @@ update_git() { | |
fi | ||
} | ||
|
||
install_python2() { | ||
# We only do this if python2 == /usr/bin/python2, which means it's system python | ||
if [ "$(which python2)" != "/usr/bin/python2" ]; then | ||
success "Already running a non-system python2." | ||
return | ||
fi | ||
|
||
info "Installing python2 from khan/repo. This may take a few minutes." | ||
brew86 install khan/repo/python@2 | ||
} | ||
|
||
install_node() { | ||
if ! which node >/dev/null 2>&1; then | ||
# Install node 16: It's LTS and the latest version supported on | ||
|
@@ -302,12 +291,6 @@ install_jq() { | |
|
||
install_python_tools() { | ||
# Python3 is needed to run the python services (e.g. ai-guide-core). | ||
# We pin it at python3.8 at the moment, but will move it to python3.11 soon | ||
# TODO(csilvers, GL-1195): remove python3.8 ai-guide-core is on python3.11 | ||
if ! which python3.8 >/dev/null 2>&1; then | ||
info "Installing python 3.8\n" | ||
brew install [email protected] | ||
fi | ||
if ! which python3.11 >/dev/null 2>&1; then | ||
info "Installing python 3.11\n" | ||
brew install [email protected] | ||
|
@@ -318,13 +301,6 @@ install_python_tools() { | |
if ! brew ls pyenv >/dev/null 2>&1; then | ||
info "Installing pyenv\n" | ||
brew install pyenv | ||
# At the moment, we depend on MacOS coming with python 2.7. If that | ||
# stops, or we want to align the python versions with the linux | ||
# dotfiles more effectively, we could do it with pyenv: | ||
# `pyenv install 2.7.16 ; pyenv global 2.7.16` | ||
# Because the linux dotfiles do not yet install pyenv, holding off on | ||
# using pyenv to enforce python version until either that happens, or | ||
# MacOs stops including python 2.7 by default. | ||
else | ||
success "pyenv already installed" | ||
fi | ||
|
@@ -366,8 +342,6 @@ install_openssl | |
install_jq | ||
update_git | ||
|
||
"$DEVTOOLS_DIR"/khan-dotfiles/bin/install-mac-python2.py | ||
|
||
install_node | ||
install_go | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.