mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
replace some bazel-bin references in our scripts
+ fix scripts/mypy-watch, and make it only listen to change events
This commit is contained in:
parent
f4ec3bb84a
commit
e986304592
7 changed files with 11 additions and 11 deletions
10
qt/dmypy.py
10
qt/dmypy.py
|
@ -13,8 +13,8 @@ import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
workspace = Path(os.environ["BUILD_WORKSPACE_DIRECTORY"])
|
workspace = Path(os.environ["BUILD_WORKSPACE_DIRECTORY"])
|
||||||
binroot = workspace / "bazel-bin"
|
binroot = workspace / "../bazel/anki/bin"
|
||||||
dmypy_bin = binroot / "external/py_deps_pypi__mypy/rules_python_wheel_entry_point_dmypy"
|
dmypy_bin = binroot / "external/py_deps_mypy/rules_python_wheel_entry_point_dmypy"
|
||||||
|
|
||||||
if sys.platform.startswith("win32"):
|
if sys.platform.startswith("win32"):
|
||||||
binext = ".exe"
|
binext = ".exe"
|
||||||
|
@ -30,13 +30,13 @@ if subprocess.run(
|
||||||
"--",
|
"--",
|
||||||
"--config-file",
|
"--config-file",
|
||||||
"qt/mypy.ini",
|
"qt/mypy.ini",
|
||||||
"bazel-bin/qt/dmypy.runfiles/ankidesktop/pylib/anki",
|
"../bazel/anki/bin/qt/dmypy.runfiles/ankidesktop/pylib/anki",
|
||||||
"bazel-bin/qt/dmypy.runfiles/ankidesktop/qt/aqt",
|
"../bazel/anki/bin/qt/dmypy.runfiles/ankidesktop/qt/aqt",
|
||||||
"--python-executable",
|
"--python-executable",
|
||||||
os.path.abspath("python/stubs/extendsitepkgs"),
|
os.path.abspath("python/stubs/extendsitepkgs"),
|
||||||
],
|
],
|
||||||
env={
|
env={
|
||||||
"MYPYPATH": "bazel-bin/qt/dmypy.runfiles/pyqt6",
|
"MYPYPATH": "../bazel/anki/bin/qt/dmypy.runfiles/pyqt6",
|
||||||
"EXTRA_SITE_PACKAGES": os.path.abspath(os.getenv("EXTRA_SITE_PACKAGES")),
|
"EXTRA_SITE_PACKAGES": os.path.abspath(os.getenv("EXTRA_SITE_PACKAGES")),
|
||||||
},
|
},
|
||||||
cwd=workspace,
|
cwd=workspace,
|
||||||
|
|
|
@ -9,4 +9,4 @@ test -e WORKSPACE || (
|
||||||
|
|
||||||
rm -rf bazel-dist
|
rm -rf bazel-dist
|
||||||
bazel build --config opt dist
|
bazel build --config opt dist
|
||||||
tar xvf bazel-bin/dist.tar
|
tar xvf ../bazel/anki/bin/dist.tar
|
||||||
|
|
|
@ -9,4 +9,4 @@ rd /s /q bazel-dist
|
||||||
|
|
||||||
set BUILDARGS=-k -c opt dist --color=yes
|
set BUILDARGS=-k -c opt dist --color=yes
|
||||||
call .\bazel build %BUILDARGS% || exit /b 1
|
call .\bazel build %BUILDARGS% || exit /b 1
|
||||||
tar xvf bazel-bin\dist.tar || exit /b 1
|
tar xvf ..\bazel\anki\bin\dist.tar || exit /b 1
|
||||||
|
|
|
@ -8,4 +8,4 @@ cmd='printf \\033c\\n; bazel run qt:dmypy'
|
||||||
sh -c "$cmd"
|
sh -c "$cmd"
|
||||||
|
|
||||||
# then monitor for changes
|
# then monitor for changes
|
||||||
fswatch -r -o pylib qt | xargs -n1 -I{} sh -c "$cmd"
|
fswatch -r -o --event Updated pylib qt | xargs -n1 -I{} sh -c "$cmd"
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SASS_PATH=ts/sass:$(pwd)/bazel-bin/ts/sass \
|
SASS_PATH=ts/sass:$(pwd)/../bazel/anki/bin/ts/sass \
|
||||||
node_modules/.bin/svelte-check \
|
node_modules/.bin/svelte-check \
|
||||||
--workspace ts
|
--workspace ts
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
# The pages can be accessed by, eg surfing to
|
# The pages can be accessed by, eg surfing to
|
||||||
# http://localhost:40000/_anki/pages/deckconfig.html
|
# http://localhost:40000/_anki/pages/deckconfig.html
|
||||||
|
|
||||||
ANKI_DATA_FOLDER=$(pwd)/bazel-bin/qt/aqt \
|
ANKI_DATA_FOLDER=$(pwd)/../bazel/anki/bin/qt/aqt \
|
||||||
QTWEBENGINE_REMOTE_DEBUGGING=8080 \
|
QTWEBENGINE_REMOTE_DEBUGGING=8080 \
|
||||||
ANKI_API_PORT=40000 ANKIDEV=1 ./run $*
|
ANKI_API_PORT=40000 ANKIDEV=1 ./run $*
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"rootDirs": [
|
"rootDirs": [
|
||||||
".",
|
".",
|
||||||
// for VS code
|
// for VS code
|
||||||
"../bazel-bin/ts"
|
"../../bazel/anki/bin/ts"
|
||||||
],
|
],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {},
|
"paths": {},
|
||||||
|
|
Loading…
Reference in a new issue