mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Enable --gen-onefile in Python (#6953)
* Enable --gen-onefile in Python Made it possible to generate all python code in one file. Modified py_test.py so that it can switch between the multi-file code and the one-file code. Updated PythonTest.sh and py_test.py so that the multi-file code and the one-file code can be tested based on the same test code. * Sync with google/flatbuffers * Add --gen-onefile to generate_code.py
This commit is contained in:
@@ -102,7 +102,7 @@ std::string FlatCompiler::GetUsageString(const char *program_name) const {
|
||||
" --no-includes Don\'t generate include statements for included\n"
|
||||
" schemas the generated file depends on (C++ / Python).\n"
|
||||
" --gen-mutable Generate accessors that can mutate buffers in-place.\n"
|
||||
" --gen-onefile Generate single output file for C# and Go.\n"
|
||||
" --gen-onefile Generate single output file for C#, Go, and Python.\n"
|
||||
" --gen-name-strings Generate type name functions for C++ and Rust.\n"
|
||||
" --gen-object-api Generate an additional object-based API.\n"
|
||||
" --gen-compare Generate operator== for object-based API types.\n"
|
||||
@@ -331,6 +331,7 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
opts.include_dependence_headers = false;
|
||||
} else if (arg == "--gen-onefile") {
|
||||
opts.one_file = true;
|
||||
opts.include_dependence_headers = false;
|
||||
} else if (arg == "--raw-binary") {
|
||||
raw_binary = true;
|
||||
} else if (arg == "--size-prefixed") {
|
||||
|
||||
Reference in New Issue
Block a user