Skip to content
Snippets Groups Projects
Commit 2db709de authored by Nan Zhang's avatar Nan Zhang
Browse files

Build fontchain_lint using python_binary_host

Test: out/host/linux-x86/bin/fontchain_lint
out/target/product/generic/system true external/unicode
Bug: b/27727331

Change-Id: Ib9353d2338c3b939027069f49e3e847c65526581
parent 413a3081
No related branches found
No related tags found
No related merge requests found
......@@ -102,3 +102,29 @@ java_library {
dxflags: ["--core-library"],
installable: false,
}
python_defaults {
name: "base_default",
version: {
py2: {
enabled: true,
embedded_launcher: true,
},
py3: {
enabled: false,
embedded_launcher: false,
},
},
}
python_binary_host {
name: "fontchain_linter",
defaults: ["base_default"],
main: "tools/fonts/fontchain_linter.py",
srcs: [
"tools/fonts/fontchain_linter.py",
],
libs: [
"fontTools",
],
}
......@@ -112,7 +112,7 @@ include $(BUILD_PREBUILT)
# Run sanity tests on fonts on checkbuild
checkbuild: fontchain_lint
FONTCHAIN_LINTER := frameworks/base/tools/fonts/fontchain_lint.py
FONTCHAIN_LINTER := $(HOST_OUT_EXECUTABLES)/fontchain_linter
ifeq ($(MINIMAL_FONT_FOOTPRINT),true)
CHECK_EMOJI := false
else
......@@ -121,5 +121,4 @@ endif
.PHONY: fontchain_lint
fontchain_lint: $(FONTCHAIN_LINTER) $(TARGET_OUT)/etc/fonts.xml $(PRODUCT_OUT)/system.img
PYTHONPATH=$$PYTHONPATH:external/fonttools/Lib \
python $(FONTCHAIN_LINTER) $(TARGET_OUT) $(CHECK_EMOJI) external/unicode
$(FONTCHAIN_LINTER) $(TARGET_OUT) $(CHECK_EMOJI) external/unicode
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment