diff options
author | Takuto Ikuta <tikuta@google.com> | 2018-03-14 23:15:32 +0900 |
---|---|---|
committer | Qijiang Fan <fqj@google.com> | 2020-06-05 08:46:09 +0900 |
commit | 95425fa454b13f905ee790feb41867bac72ff83f (patch) | |
tree | c16b5d7c385bf7b5667435522ed65b02ab74aa37 /third_party | |
parent | 3cff39c0657f656b28815464096a59e28432a4b9 (diff) | |
download | libchrome-95425fa454b13f905ee790feb41867bac72ff83f.tar.gz |
Added dependency to jinja2 sources for mojom generator
mojom generator uses jinja2 template.
If we update jinja2 library, jinja2 may update api/internal structure.
In such case, all mojom generator using jinja2 may need to re-run.
I added jinja2_sources for such case and use it as inputs dependency for mojom generator action.
It is recommended by gn.
https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/reference.md#target-declarations-action_declare-a-target-that-runs-a-script-a-single-time-inputs
* Minor fix
Update README.chromium to pass current presubmit check.
Change-Id: I8b7f126c3a807ac211db01c90437d584c9c39f85
Reviewed-on: https://chromium-review.googlesource.com/961763
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/master@{#543073}
CrOS-Libchrome-Original-Commit: 18c898ac14ab3b736ec3abca95dccff782f1c351
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/jinja2/LICENSE | 62 | ||||
-rw-r--r-- | third_party/jinja2/README.chromium | 7 | ||||
-rwxr-xr-x | third_party/jinja2/get_jinja2.sh | 14 | ||||
-rw-r--r-- | third_party/jinja2/jinja2.gni | 27 |
4 files changed, 76 insertions, 34 deletions
diff --git a/third_party/jinja2/LICENSE b/third_party/jinja2/LICENSE index 31bf900e58..10145a2643 100644 --- a/third_party/jinja2/LICENSE +++ b/third_party/jinja2/LICENSE @@ -1,31 +1,31 @@ -Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details. - -Some rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
+
+Some rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * The names of the contributors may not be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/third_party/jinja2/README.chromium b/third_party/jinja2/README.chromium index 684ff8ec0a..f1d6620f68 100644 --- a/third_party/jinja2/README.chromium +++ b/third_party/jinja2/README.chromium @@ -2,8 +2,8 @@ Name: Jinja2 Python Template Engine Short Name: jinja2 URL: http://jinja.pocoo.org/ Version: 2.8 -License: BSD 3-clause License -License File: NOT_SHIPPED +License: BSD 3-Clause +License File: LICENSE Security Critical: no Description: @@ -19,7 +19,8 @@ AUTHORS files. Unit tests (testsuite directory) have been removed. Additional chromium-specific files are: * README.chromium (this file) * OWNERS -* install script (get_jinja2.sh) +* get_jinja2.sh (install script) +* jinja2.gni (generated by get_jinja2.sh) * files of hashes (MD5 is also posted on website, SHA-512 computed locally). Script checks hash then unpacks archive and installs desired files. Retrieve or update by executing jinja2/get_jinja2.sh from third_party. diff --git a/third_party/jinja2/get_jinja2.sh b/third_party/jinja2/get_jinja2.sh index 0018349ebc..34758ef4b7 100755 --- a/third_party/jinja2/get_jinja2.sh +++ b/third_party/jinja2/get_jinja2.sh @@ -120,3 +120,17 @@ mv "$INSTALL_DIR" "$OLD_DIR" mv "$PACKAGE_DIR" "$INSTALL_DIR" cd "$INSTALL_DIR" rm -fr "$OLD_DIR" + +# Generating jinja2.gni +cat > jinja2.gni <<EOF +# DO NOT EDIT +# This is generated from get_jinja2.sh. +jinja2_sources = [ +EOF + +for i in $(LC_COLLATE=C ls *.py) +do + echo " \"//third_party/jinja2/${i}\"," >> jinja2.gni +done + +echo "]" >> jinja2.gni diff --git a/third_party/jinja2/jinja2.gni b/third_party/jinja2/jinja2.gni new file mode 100644 index 0000000000..85bc168257 --- /dev/null +++ b/third_party/jinja2/jinja2.gni @@ -0,0 +1,27 @@ +# DO NOT EDIT +# This is generated from get_jinja2.sh. +jinja2_sources = [ + "//third_party/jinja2/__init__.py", + "//third_party/jinja2/_compat.py", + "//third_party/jinja2/_stringdefs.py", + "//third_party/jinja2/bccache.py", + "//third_party/jinja2/compiler.py", + "//third_party/jinja2/constants.py", + "//third_party/jinja2/debug.py", + "//third_party/jinja2/defaults.py", + "//third_party/jinja2/environment.py", + "//third_party/jinja2/exceptions.py", + "//third_party/jinja2/ext.py", + "//third_party/jinja2/filters.py", + "//third_party/jinja2/lexer.py", + "//third_party/jinja2/loaders.py", + "//third_party/jinja2/meta.py", + "//third_party/jinja2/nodes.py", + "//third_party/jinja2/optimizer.py", + "//third_party/jinja2/parser.py", + "//third_party/jinja2/runtime.py", + "//third_party/jinja2/sandbox.py", + "//third_party/jinja2/tests.py", + "//third_party/jinja2/utils.py", + "//third_party/jinja2/visitor.py", +] |