add run-qt5 script to run with 5.x
This commit is contained in:
parent
a7812dedc0
commit
36fdc607c6
@ -133,6 +133,20 @@ py_binary(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
py_binary(
|
||||||
|
name = "runanki_qt5",
|
||||||
|
srcs = [
|
||||||
|
"bazelfixes.py",
|
||||||
|
"runanki.py",
|
||||||
|
],
|
||||||
|
imports = ["."],
|
||||||
|
main = "runanki.py",
|
||||||
|
deps = [
|
||||||
|
"//pylib/anki",
|
||||||
|
"//qt/aqt:aqt_with_data_qt5",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
py_binary(
|
py_binary(
|
||||||
name = "dmypy",
|
name = "dmypy",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
@ -50,7 +50,6 @@ aqt_deps = [
|
|||||||
requirement("waitress"),
|
requirement("waitress"),
|
||||||
requirement("send2trash"),
|
requirement("send2trash"),
|
||||||
requirement("jsonschema"),
|
requirement("jsonschema"),
|
||||||
"@pyqt6//:pkg",
|
|
||||||
] + select({
|
] + select({
|
||||||
"@bazel_tools//src/conditions:host_windows": [
|
"@bazel_tools//src/conditions:host_windows": [
|
||||||
requirement("psutil"),
|
requirement("psutil"),
|
||||||
@ -66,7 +65,9 @@ py_library(
|
|||||||
srcs = _py_srcs_and_forms,
|
srcs = _py_srcs_and_forms,
|
||||||
data = aqt_core_data,
|
data = aqt_core_data,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = aqt_deps,
|
deps = aqt_deps + [
|
||||||
|
"@pyqt6//:pkg",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
py_library(
|
py_library(
|
||||||
@ -74,7 +75,19 @@ py_library(
|
|||||||
srcs = _py_srcs_and_forms,
|
srcs = _py_srcs_and_forms,
|
||||||
data = aqt_core_data + ["//qt/aqt/data"],
|
data = aqt_core_data + ["//qt/aqt/data"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = aqt_deps,
|
deps = aqt_deps + [
|
||||||
|
"@pyqt6//:pkg",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
py_library(
|
||||||
|
name = "aqt_with_data_qt5",
|
||||||
|
srcs = _py_srcs_and_forms,
|
||||||
|
data = aqt_core_data + ["//qt/aqt/data"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = aqt_deps + [
|
||||||
|
"@pyqt5//:pkg",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
py_package(
|
py_package(
|
||||||
|
24
run-qt5
Executable file
24
run-qt5
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
run_linux() {
|
||||||
|
bazel run $BUILDARGS //qt:runanki_qt5 -- $*
|
||||||
|
}
|
||||||
|
|
||||||
|
run_mac() {
|
||||||
|
# QtWebEngineProcess is unable to locate icudtl.dat from a symlinked tree,
|
||||||
|
# so we need to copy the files into a working folder before running on a Mac.
|
||||||
|
workspace=$(dirname $0)
|
||||||
|
bazel build $BUILDARGS //qt:runanki_qt5 && \
|
||||||
|
rsync -aiL --exclude=anki/external --delete -f'-p __pycache__' \
|
||||||
|
$workspace/bazel-bin/qt/runanki* $workspace/bazel-copy/ && \
|
||||||
|
$workspace/bazel-copy/runanki_qt5 $*
|
||||||
|
}
|
||||||
|
|
||||||
|
export PYTHONWARNINGS=default
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
run_mac $*
|
||||||
|
else
|
||||||
|
run_linux $*
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user