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

Upgrade to Python 3.10 #149

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions download-python.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
release_date="20210724"
filename="cpython-3.9.6-x86_64-apple-darwin-install_only-20210724T1424.tar.gz"
release_date="20220802"
filename="cpython-3.10.6+20220802-x86_64-apple-darwin-install_only.tar.gz"

standalone_python="python/"

Expand All @@ -9,5 +9,5 @@ if [ ! -d "$standalone_python" ]; then
tar -xzvf ${filename}
rm -rf ${filename}
# Now delete the test/ folder, saving about 23MB of disk space
rm -rf python/lib/python3.9/test
rm -rf python/lib/python3.10/test
fi
8 changes: 4 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ class DatasetteServer {
let shouldCreateVenv = true;
if (fs.existsSync(venv_dir)) {
// Check Python interpreter still works, using
// ~/.datasette-app/venv/bin/python3.9 --version
// ~/.datasette-app/venv/bin/python3.10 --version
// See https://github.com/simonw/datasette-app/issues/89
const venv_python = path.join(venv_dir, "bin", "python3.9");
const venv_python = path.join(venv_dir, "bin", "python3.10");
try {
await this.execCommand(venv_python, ["--version"]);
shouldCreateVenv = false;
Expand Down Expand Up @@ -453,9 +453,9 @@ class DatasetteServer {
function findPython() {
const possibilities = [
// In packaged app
path.join(process.resourcesPath, "python", "bin", "python3.9"),
path.join(process.resourcesPath, "python", "bin", "python3.10"),
// In development
path.join(__dirname, "python", "bin", "python3.9"),
path.join(__dirname, "python", "bin", "python3.10"),
];
for (const path of possibilities) {
if (fs.existsSync(path)) {
Expand Down
Loading