File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1226,6 +1226,16 @@ int link_executable(const std::vector<std::string> &infiles,
12261226 if (compiler_options.enable_symengine ) {
12271227 cmd += " -L$CONDA_PREFIX/lib -Wl,-rpath -Wl,$CONDA_PREFIX/lib -lsymengine" ;
12281228 }
1229+
1230+ if (compiler_options.enable_cpython ) {
1231+ std::string py_version = " 3.10" ;
1232+ std::string py_flags = R"( -I $CONDA_PREFIX/include/python)" + py_version + R"( -L$CONDA_PREFIX/lib -Wl,-rpath -Wl,$CONDA_PREFIX/lib -lpython)" + py_version + R"( )" ;
1233+ if (compiler_options.link_numpy ) {
1234+ py_flags += R"( -I$CONDA_PREFIX/lib/python)" + py_version + R"( /site-packages/numpy/core/include)" ;
1235+ }
1236+ cmd += " " + py_flags;
1237+ }
1238+
12291239 int err = system (cmd.c_str ());
12301240 if (err) {
12311241 std::cout << " The command '" + cmd + " ' failed." << std::endl;
You can’t perform that action at this time.
0 commit comments