Skip to content

Commit

Permalink
Move targets in pytype/tools/ into their own directories.
Browse files Browse the repository at this point in the history
Moves targets containing src files in pytype/tools,
pytype/tools/analyze_project, and pytype/tools/merge_pyi into
BUILD/CMakeLists.txt files in their respective directories.

After this, we'll only have one more directory (pytype/typegraph) plus a rename
(pytype/stubs) to deal with.

PiperOrigin-RevId: 344942930
  • Loading branch information
rchen152 committed Dec 2, 2020
1 parent 0ebf7b5 commit d09c020
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 41 deletions.
30 changes: 0 additions & 30 deletions pytype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,36 +247,6 @@ py_library(
pytype.typegraph.cfg
)

py_library(
NAME
tools
SRCS
tools/arg_parser.py
tools/config.py
tools/environment.py
tools/runner.py
tools/tool_utils.py
DEPS
.config
.utils
pytype.pytd.typeshed
)

py_library(
NAME
analyze_project
SRCS
tools/analyze_project/config.py
tools/analyze_project/environment.py
tools/analyze_project/parse_args.py
tools/analyze_project/pytype_runner.py
DEPS
.config
.io
.tools
.utils
)

# This library is disabled because cfg.py can conflict with the typegraph.cfg
# extension module.
# py_library(
Expand Down
23 changes: 19 additions & 4 deletions pytype/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
add_package()

py_library(
NAME
tools
SRCS
arg_parser.py
config.py
environment.py
runner.py
tool_utils.py
DEPS
pytype.config
pytype.utils
pytype.pytd.typeshed
)

py_test(
NAME
arg_parser_test
SRCS
arg_parser_test.py
DEPS
.tools
pytype.config
pytype.tools
)

py_test(
Expand All @@ -16,7 +31,7 @@ py_test(
SRCS
config_test.py
DEPS
pytype.tools
.tools
pytype.utils
)

Expand All @@ -26,7 +41,7 @@ py_test(
SRCS
environment_test.py
DEPS
pytype.tools
.tools
pytype.utils
)

Expand All @@ -36,7 +51,7 @@ py_test(
SRCS
tool_utils_test.py
DEPS
pytype.tools
.tools
pytype.utils
)

Expand Down
23 changes: 19 additions & 4 deletions pytype/tools/analyze_project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
add_package()

py_library(
NAME
analyze_project
SRCS
config.py
environment.py
parse_args.py
pytype_runner.py
DEPS
pytype.config
pytype.io
pytype.utils
pytype.tools.tools
)

py_test(
NAME
config_test
SRCS
config_test.py
DEPS
pytype.analyze_project
.analyze_project
pytype.utils
)

Expand All @@ -16,7 +31,7 @@ py_test(
SRCS
parse_args_test.py
DEPS
pytype.analyze_project
.analyze_project
)

py_test(
Expand All @@ -25,7 +40,7 @@ py_test(
SRCS
pytype_runner_test.py
DEPS
pytype.analyze_project
.analyze_project
pytype.config
pytype.utils
)
Expand All @@ -38,5 +53,5 @@ toplevel_py_binary(
MAIN
main.py
DEPS
pytype.analyze_project
.analyze_project
)
2 changes: 1 addition & 1 deletion pytype/tools/annotate_ast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ toplevel_py_binary(
DEPS
.annotate_ast
pytype.ast.visitor
pytype.tools
pytype.tools.tools
)

py_library(
Expand Down
4 changes: 2 additions & 2 deletions pytype/tools/xref/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ py_library(
pytype.errors
pytype.io
pytype.libvm
pytype.tools
pytype.tools.tools
pytype.tools.traces.traces
)

Expand All @@ -36,8 +36,8 @@ py_library(
DEPS
.indexer
pytype.config
pytype.tools
pytype.utils
pytype.tools.tools
)

py_library(
Expand Down

0 comments on commit d09c020

Please sign in to comment.