pip/ -> python/

This commit is contained in:
Damien Elmes 2021-10-18 19:50:40 +10:00
parent 75932db734
commit 5e604df306
24 changed files with 20 additions and 20 deletions

View file

@ -2,13 +2,13 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
load("@bazel_skylib//lib:versions.bzl", "versions") load("@bazel_skylib//lib:versions.bzl", "versions")
load("@rules_rust//rust:repositories.bzl", "rust_repositories") load("@rules_rust//rust:repositories.bzl", "rust_repositories")
load("@ankidesktop//cargo:crates.bzl", "raze_fetch_remote_crates") load("@ankidesktop//cargo:crates.bzl", "raze_fetch_remote_crates")
load(":python.bzl", "setup_local_python") load("//python:python.bzl", "setup_local_python")
load("//proto:protobuf.bzl", "setup_protobuf_binary") load("//proto:protobuf.bzl", "setup_protobuf_binary")
load("//proto:clang_format.bzl", "setup_clang_format") load("//proto:clang_format.bzl", "setup_clang_format")
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install") load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories") load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")
load("//pip/pyqt5:defs.bzl", "install_pyqt5") load("//python/pyqt5:defs.bzl", "install_pyqt5")
load("//pip/pyqt6:defs.bzl", "install_pyqt6") load("//python/pyqt6:defs.bzl", "install_pyqt6")
load("@rules_python//python:pip.bzl", "pip_parse") load("@rules_python//python:pip.bzl", "pip_parse")
anki_version = "2.1.49" anki_version = "2.1.49"
@ -35,7 +35,7 @@ def setup_deps():
pip_parse( pip_parse(
name = "py_deps", name = "py_deps",
requirements_lock = "@ankidesktop//pip:requirements.txt", requirements_lock = "@ankidesktop//python:requirements.txt",
python_interpreter_target = "@python//:python", python_interpreter_target = "@python//:python",
) )

View file

@ -20,14 +20,14 @@ py_test(
args = [ args = [
"anki", "anki",
"$(location mypy.ini)", "$(location mypy.ini)",
"$(location //pip/stubs:extendsitepkgs)", "$(location //python/stubs:extendsitepkgs)",
], ],
data = [ data = [
"mypy.ini", "mypy.ini",
"//pip/stubs", "//python/stubs",
"//pip/stubs:extendsitepkgs", "//python/stubs:extendsitepkgs",
], ],
env = {"EXTRA_SITE_PACKAGES": "$(location //pip/stubs)"}, env = {"EXTRA_SITE_PACKAGES": "$(location //python/stubs)"},
main = "tests/run_mypy.py", main = "tests/run_mypy.py",
deps = [ deps = [
"//pylib/anki", "//pylib/anki",

View file

@ -30,7 +30,7 @@ If the label is specified it will overwrite the python_interpreter attribute.
"""), """),
"_script": attr.label( "_script": attr.label(
executable = True, executable = True,
default = Label("//pip/pyqt5:install_pyqt5.py"), default = Label("//python/pyqt5:install_pyqt5.py"),
cfg = "host", cfg = "host",
), ),
"quiet": attr.bool( "quiet": attr.bool(

View file

@ -30,7 +30,7 @@ If the label is specified it will overwrite the python_interpreter attribute.
"""), """),
"_script": attr.label( "_script": attr.label(
executable = True, executable = True,
default = Label("//pip/pyqt6:install_pyqt6.py"), default = Label("//python/pyqt6:install_pyqt6.py"),
cfg = "host", cfg = "host",
), ),
"quiet": attr.bool( "quiet": attr.bool(

View file

@ -46,15 +46,15 @@ py_test(
"aqt", "aqt",
"$(location mypy.ini)", "$(location mypy.ini)",
"$(location @pyqt6//:__init__.py)", "$(location @pyqt6//:__init__.py)",
"$(location //pip/stubs:extendsitepkgs)", "$(location //python/stubs:extendsitepkgs)",
], ],
data = [ data = [
"mypy.ini", "mypy.ini",
"//pip/stubs", "//python/stubs",
"//pip/stubs:extendsitepkgs", "//python/stubs:extendsitepkgs",
"@pyqt6//:__init__.py", "@pyqt6//:__init__.py",
], ],
env = {"EXTRA_SITE_PACKAGES": "$(location //pip/stubs)"}, env = {"EXTRA_SITE_PACKAGES": "$(location //python/stubs)"},
main = "tests/run_mypy.py", main = "tests/run_mypy.py",
deps = [ deps = [
"//pylib/anki", "//pylib/anki",
@ -155,11 +155,11 @@ py_binary(
], ],
data = [ data = [
# ensure the binary's been built # ensure the binary's been built
"//pip:dmypy", "//python:dmypy",
"//pip/stubs", "//python/stubs",
"//pip/stubs:extendsitepkgs", "//python/stubs:extendsitepkgs",
], ],
env = {"EXTRA_SITE_PACKAGES": "$(location //pip/stubs)"}, env = {"EXTRA_SITE_PACKAGES": "$(location //python/stubs)"},
imports = ["."], imports = ["."],
tags = ["manual"], tags = ["manual"],
deps = [ deps = [

View file

@ -6,8 +6,8 @@ import sys
from pathlib import Path from pathlib import Path
nonstandard_header = { nonstandard_header = {
"pip/pyqt5/install_pyqt5.py", "python/pyqt5/install_pyqt5.py",
"pip/pyqt6/install_pyqt6.py", "python/pyqt6/install_pyqt6.py",
"pylib/anki/importing/pauker.py", "pylib/anki/importing/pauker.py",
"pylib/anki/importing/supermemo_xml.py", "pylib/anki/importing/supermemo_xml.py",
"pylib/anki/statsbg.py", "pylib/anki/statsbg.py",