tools: Migrate to setup.cfg and then new Python build
- Convert //tools/setup.py to setup.cfg
- Remove pip dependencies on individual 'pw_*' packages.
- Set the pw_build_USE_NEW_PYTHON_BUILD = true gn arg.
Change-Id: Id6092e2abfbd8c8444d73044929f4d217055667a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/sample_project/+/88467
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 4abef86..28883d0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -16,6 +16,7 @@
import("$dir_pw_arduino_build/arduino.gni")
import("$dir_pw_build/python.gni")
+import("$dir_pw_build/python_dist.gni")
import("$dir_pw_tokenizer/database.gni")
import("$dir_pw_unit_test/test.gni")
@@ -87,13 +88,17 @@
pw_python_group("python") {
# This depends on the 'tools' target in //tools/BUILD.gn
python_deps = [
- "tools",
+ ":pip_install_sample_project_tools",
"workshop/05-factory-test:factory_test_script",
"//third_party/pigweed/pw_env_setup:python",
"//third_party/pigweed/pw_env_setup:target_support_packages",
]
}
+pw_internal_pip_install("pip_install_sample_project_tools") {
+ packages = [ "//tools:tools" ]
+}
+
# This 'pw_tokenizer_database' target will update the tokenizer_database.csv
# file for all dependencies listed in 'targets'.
pw_tokenizer_database("tokenizer_database") {