From c3ff77fcb9af7d27b7603a2225a2227407768694 Mon Sep 17 00:00:00 2001 From: yougotwill Date: Thu, 6 Feb 2025 12:04:52 +1100 Subject: [PATCH] fix: use python instead of python3 for script commands this fixes building on windows, python 3 should be the default on all major os's --- package.json | 6 +++--- tools/README.md | 20 ++++++++++++-------- tools/localization/crowdInPostImport.sh | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 8448927cd..04566d983 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ "build-everything:watch": "yarn clean && yarn protobuf && yarn update-git-info && yarn sass && yarn build:locales-soft && yarn build:workers && yarn tsc -w", "start-dev:pretty": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod$MULTI electron . | npx bunyan", "build:workers": "yarn worker:utils && yarn worker:libsession", - "build:locales": "python3 ./tools/localization/generateLocales.py --generate-types --print-problems --error-on-problems --error-old-dynamic-variables", - "build:locales-soft": "python3 ./tools/localization/generateLocales.py --generate-types --print-problems --print-problem-strings", + "build:locales": "python ./tools/localization/generateLocales.py --generate-types --print-problems --error-on-problems --error-old-dynamic-variables", + "build:locales-soft": "python ./tools/localization/generateLocales.py --generate-types --print-problems --print-problem-strings", "watch": "yarn clean && yarn protobuf && yarn update-git-info && yarn build-everything:watch", "protobuf": "pbjs --target static-module --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js --force-long", "sass": "rimraf 'stylesheets/dist/' && webpack --config=./sass.config.js", @@ -61,7 +61,7 @@ "worker:libsession": "rimraf 'ts/webworker/workers/node/libsession/*.node' && webpack --config=./libsession.worker.config.js", "dedup-yarn-lock": "npx --yes yarn-deduplicate yarn.lock", "prepare": "husky install", - "print-deps": "node -v && python3 --version" + "print-deps": "node -v && python --version" }, "dependencies": { "@emoji-mart/data": "^1.1.2", diff --git a/tools/README.md b/tools/README.md index a363e303c..e684860ed 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,17 +1,21 @@ # Tools +> [!WARNING] +> Make sure you have the correct version of [Python](https://www.python.org/downloads/) installed. +> You can get the current `` from the [`.tool-versions`](../.tool-versions). + ## Using the Python scripts The Python scripts are located in the `tools` directory. To run a script, use the following command: ```bash -python3 ./tools/