Skip to content

Commit

Permalink
sys implementation is python3 only
Browse files Browse the repository at this point in the history
  • Loading branch information
guruofquality committed Jul 25, 2021
1 parent 3299945 commit 12a0dea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PythonInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ static std::string __getPythonInfoJSON()
nlohmann::json topObj;
auto& pythonInfo = topObj["Python Info"];
pythonInfo["Exec Prefix"] = sys.get<std::string>("exec_prefix");
#if PY_MAJOR_VERSION >= 3
pythonInfo["Implementation"] = sys.get("implementation").get<std::string>("name");
pythonInfo["Cache Tag"] = sys.get("implementation").get<std::string>("cache_tag");
#endif

auto& versionInfo = pythonInfo["Version Info"];

Expand Down

0 comments on commit 12a0dea

Please sign in to comment.