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

Makes download-python.sh idempotent and easy to upgrade versions #90

Merged
merged 2 commits into from
Sep 10, 2021
Merged
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
15 changes: 11 additions & 4 deletions download-python.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/bin/bash
release_date="20210724"
filename="cpython-3.9.6-x86_64-apple-darwin-install_only-20210724T1424.tar.gz"

wget https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-x86_64-apple-darwin-install_only-20210724T1424.tar.gz
tar -xzvf cpython-3.9.6-x86_64-apple-darwin-install_only-20210724T1424.tar.gz
# Now delete the test/ folder, saving about 23MB of disk space
rm -rf python/lib/python3.9/test
standalone_python="python/"

if [ ! -d "$standalone_python" ]; then
wget https://github.com/indygreg/python-build-standalone/releases/download/${release_date}/${filename}
tar -xzvf ${filename}
rm -rf ${filename}
# Now delete the test/ folder, saving about 23MB of disk space
rm -rf python/lib/python3.9/test
fi