symlink generated .py/.pyi into tree to fix Python code completion
This commit is contained in:
parent
dee0a2fc18
commit
53276b3044
3
pylib/.gitignore
vendored
3
pylib/.gitignore
vendored
@ -10,8 +10,5 @@
|
||||
.pytype
|
||||
__pycache__
|
||||
anki.egg-info
|
||||
anki/backend_pb2.*
|
||||
anki/fluent_pb2.*
|
||||
anki/rsbackend_gen.py
|
||||
build
|
||||
dist
|
||||
|
1
pylib/anki/.gitignore
vendored
1
pylib/anki/.gitignore
vendored
@ -1 +0,0 @@
|
||||
buildinfo.py
|
@ -65,11 +65,17 @@ alias(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
_py_srcs = glob(
|
||||
["**/*.py"],
|
||||
exclude = [
|
||||
"rsbackend_gen.py",
|
||||
"hooks_gen.py",
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "anki",
|
||||
srcs = glob([
|
||||
"**/*.py",
|
||||
]),
|
||||
srcs = _py_srcs,
|
||||
data = [
|
||||
"py.typed",
|
||||
":backend_pb2",
|
||||
@ -130,7 +136,7 @@ py_wheel(
|
||||
|
||||
filegroup(
|
||||
name = "py_source_files",
|
||||
srcs = glob(["**/*.py"]),
|
||||
srcs = _py_srcs,
|
||||
visibility = [
|
||||
"//pylib:__subpackages__",
|
||||
"//qt/po:__pkg__",
|
||||
|
1
pylib/anki/backend_pb2.pyi
Symbolic link
1
pylib/anki/backend_pb2.pyi
Symbolic link
@ -0,0 +1 @@
|
||||
../../bazel-bin/pylib/anki/backend_pb2.pyi
|
1
pylib/anki/fluent_pb2.pyi
Symbolic link
1
pylib/anki/fluent_pb2.pyi
Symbolic link
@ -0,0 +1 @@
|
||||
../../bazel-bin/pylib/anki/fluent_pb2.pyi
|
1
pylib/anki/hooks_gen.py
Symbolic link
1
pylib/anki/hooks_gen.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../bazel-bin/pylib/anki/hooks_gen.py
|
1
pylib/anki/rsbackend_gen.py
Symbolic link
1
pylib/anki/rsbackend_gen.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../bazel-bin/pylib/anki/rsbackend_gen.py
|
@ -83,9 +83,9 @@ py_test(
|
||||
|
||||
py_test(
|
||||
name = "format_check",
|
||||
srcs = glob([
|
||||
"**/*.py",
|
||||
]),
|
||||
srcs = glob(["**/*.py"]) + [
|
||||
"//qt/aqt:py_source_files",
|
||||
],
|
||||
args = [
|
||||
"$(location .isort.cfg)",
|
||||
],
|
||||
|
@ -23,9 +23,14 @@ genrule(
|
||||
],
|
||||
)
|
||||
|
||||
aqt_srcs = glob([
|
||||
"**/*.py",
|
||||
]) + [
|
||||
_py_srcs = glob(
|
||||
[
|
||||
"**/*.py",
|
||||
],
|
||||
exclude = ["hooks_gen.py"],
|
||||
)
|
||||
|
||||
_py_srcs_and_forms = _py_srcs + [
|
||||
"//qt/aqt/forms:forms",
|
||||
"//qt/aqt/forms:icons",
|
||||
]
|
||||
@ -59,7 +64,7 @@ aqt_deps = [
|
||||
# library without web/i18n data; faster for testing
|
||||
py_library(
|
||||
name = "aqt_without_data",
|
||||
srcs = aqt_srcs,
|
||||
srcs = _py_srcs_and_forms,
|
||||
data = aqt_core_data,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = aqt_deps,
|
||||
@ -67,7 +72,7 @@ py_library(
|
||||
|
||||
py_library(
|
||||
name = "aqt_with_data",
|
||||
srcs = aqt_srcs,
|
||||
srcs = _py_srcs_and_forms,
|
||||
data = aqt_core_data + ["//qt/aqt/data"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = aqt_deps,
|
||||
@ -122,8 +127,8 @@ py_wheel(
|
||||
|
||||
filegroup(
|
||||
name = "py_source_files",
|
||||
srcs = glob(["**/*.py"]),
|
||||
srcs = _py_srcs,
|
||||
visibility = [
|
||||
"//qt/po:__pkg__",
|
||||
"//qt:__subpackages__",
|
||||
],
|
||||
)
|
||||
|
1
qt/aqt/hooks_gen.py
Symbolic link
1
qt/aqt/hooks_gen.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../bazel-bin/qt/aqt/hooks_gen.py
|
Loading…
Reference in New Issue
Block a user