Skip to content

Commit

Permalink
Fix Python path issue on Windows VS builds.
Browse files Browse the repository at this point in the history
Fixed bug introduced by cd77d5c. On VS builds,
we the code was incorrectly deciding that the executable was being run from
install dir causing dashboard failures on VS builds. This addresses that issue.

Change-Id: Ibe98db95544964e3a0d9ac155c1c49258ab30c23
  • Loading branch information
utkarshayachit committed May 21, 2013
1 parent 11e32d1 commit b0aff1a
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,18 @@ namespace
//===========================================================================
void vtkPythonAppInitPrependPathWindows(const std::string& SELF_DIR)
{
bool is_build_dir = vtksys::SystemTools::FileExists(
(SELF_DIR + "/site-packages").c_str());
if (is_build_dir)
{
vtkPythonAppInitPrependPythonPath(SELF_DIR);
std::string build_dir_site_packages;
#if defined(CMAKE_INTDIR)
vtkPythonAppInitPrependPythonPath(SELF_DIR + "/../site-packages");
build_dir_site_packages = SELF_DIR + "/../site-packages";
#else
vtkPythonAppInitPrependPythonPath(SELF_DIR + "/site-packages");
build_dir_site_packages = SELF_DIR + "/site-packages";
#endif
bool is_build_dir =
vtksys::SystemTools::FileExists(build_dir_site_packages.c_str());
if (is_build_dir)
{
vtkPythonAppInitPrependPythonPath(SELF_DIR);
vtkPythonAppInitPrependPythonPath(build_dir_site_packages);
}
else
{
Expand Down

0 comments on commit b0aff1a

Please sign in to comment.