diff options
author | David Shah <davey1576@gmail.com> | 2018-06-27 12:00:37 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-27 12:00:37 +0200 |
commit | 87a5b7212667daa55a72f62c35cc248bdce2c744 (patch) | |
tree | cd541aeba55bbc67e1a935bb00b7669a9eed0d32 /dummy/main.cc | |
parent | 2cc7ade05b52b89186f5210c97ebbc61aa5c166d (diff) | |
parent | bafb4702c7176a08e4a9b2088297071a7bed6656 (diff) | |
download | nextpnr-87a5b7212667daa55a72f62c35cc248bdce2c744.tar.gz nextpnr-87a5b7212667daa55a72f62c35cc248bdce2c744.tar.bz2 nextpnr-87a5b7212667daa55a72f62c35cc248bdce2c744.zip |
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'dummy/main.cc')
-rw-r--r-- | dummy/main.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/dummy/main.cc b/dummy/main.cc index de578ca3..d025d8d4 100644 --- a/dummy/main.cc +++ b/dummy/main.cc @@ -92,11 +92,6 @@ int main(int argc, char *argv[]) Context ctx(ArchArgs{}); -#ifndef NO_PYTHON - init_python(argv[0]); - python_export_global("ctx", ctx); -#endif - if (vm.count("verbose")) { ctx.verbose = true; } @@ -111,9 +106,14 @@ int main(int argc, char *argv[]) #ifndef NO_PYTHON if (vm.count("run")) { + init_python(argv[0], true); + python_export_global("ctx", ctx); + std::vector<std::string> files = vm["run"].as<std::vector<std::string>>(); for (auto filename : files) execute_python_file(filename.c_str()); + + deinit_python(); } #endif @@ -126,9 +126,6 @@ int main(int argc, char *argv[]) rc = a.exec(); } #endif -#ifndef NO_PYTHON - deinit_python(); -#endif return rc; } catch (log_execution_error_exception) { #if defined(_MSC_VER) |