Skip to content

Commit

Permalink
fix python windows build error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Aug 20, 2023
1 parent ec119b6 commit 4db668a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/mcx_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -4907,7 +4907,7 @@ int mcx_lookupindex(char* key, const char* index) {
*/

void mcx_version(Config* cfg) {
const char ver[] = "$Rev:: $ "MCX_VERSION;
const char ver[] = "$Rev:: $ " MCX_VERSION;
int v = 0;
sscanf(ver, "$Rev::%x", &v);
MCX_FPRINTF(cfg->flog, "MCX Revision %x\n", v);
Expand Down Expand Up @@ -4994,7 +4994,7 @@ void mcx_printheader(Config* cfg) {
# MCX proudly developed human-readable JSON-based data formats for easy reuse,#\n\
# Please consider using JSON (https://neurojson.org/) for your research data #\n\
###############################################################################\n\
$Rev:: $ "MCX_VERSION" $Date:: $ by $Author:: $\n\
$Rev:: $ " MCX_VERSION " $Date:: $ by $Author:: $\n\
###############################################################################\n" S_RESET);
}

Expand Down
2 changes: 1 addition & 1 deletion src/mcxlab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ extern "C" int mcx_throw_exception(const int id, const char* msg, const char* fi
*/

void mcxlab_usage() {
printf("MCXLAB ("MCX_VERSION")\nUsage:\n [flux,detphoton,vol,seeds,traj]=mcxlab(cfg);\n\nPlease run 'help mcxlab' for more details.\n");
printf("MCXLAB (" MCX_VERSION ")\nUsage:\n [flux,detphoton,vol,seeds,traj]=mcxlab(cfg);\n\nPlease run 'help mcxlab' for more details.\n");
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/pmcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ int mcx_throw_exception(const int id, const char* msg, const char* filename, con

void print_mcx_usage() {
std::cout
<< "PMCX ("MCX_VERSION")\nUsage:\n output = pmcx.run(cfg);\n\nRun 'help(pmcx.run)' for more details.\n";
<< "PMCX (" MCX_VERSION ")\nUsage:\n output = pmcx.run(cfg);\n\nRun 'help(pmcx.run)' for more details.\n";
}

/**
Expand Down Expand Up @@ -1210,7 +1210,7 @@ py::list get_GPU_info() {
}

PYBIND11_MODULE(_pmcx, m) {
m.doc() = "PMCX ("MCX_VERSION"): Python bindings for Monte Carlo eXtreme photon transport simulator, http://mcx.space";
m.doc() = "PMCX (" MCX_VERSION "): Python bindings for Monte Carlo eXtreme photon transport simulator, http://mcx.space";
m.def("run", &pmcx_interface, "Runs MCX with the given config.", py::call_guard<py::scoped_ostream_redirect,
py::scoped_estream_redirect>());
m.def("run", &pmcx_interface_wargs, "Runs MCX with the given config.", py::call_guard<py::scoped_ostream_redirect,
Expand Down

0 comments on commit 4db668a

Please sign in to comment.