Hi!

I just tried to build the split python modules on MSVC 2005, using CS trunk revision 27806. Unfortunately, there were some errors.

1.: The variable called PYTHONPATH in plugins\cscript\cspython\cspython.cpp, lines 101 ff, conflicts with a Win32-specific #define inside the python headers, leading to a compiler error. Changing the name to lower case solves that.

2.: All of the dllpy_* projects cause linker errors due to unresolved symbols. Making them depend on libcrystalspace resolves those errors. Is this missing dependency intentional, or is this a bug in the build system?

3.: pysimp can't load the cspace module. I changed cspython.cpp to add scripts/python/frozen to pythonpath in addition to scripts/python. However, I'm not sure whether this should be done unconditionally.

The attached diff contains the changes mentioned in 1. and 3.

Greetings,
Lukas E.
Index: cspython.cpp
===================================================================
--- cspython.cpp        (revision 27806)
+++ cspython.cpp        (working copy)
@@ -98,10 +98,10 @@
  
   // Add compile location to pythonpath 
 #ifdef DEFAULT_PYTHMOD_PATH
-  csString PYTHONPATH (getenv ("PYTHONPATH"));
-  PYTHONPATH.Insert (0, CS_PATH_DELIMITER);
-  PYTHONPATH.Insert (0, DEFAULT_PYTHMOD_PATH);
-  setenv ("PYTHONPATH", PYTHONPATH, true);
+  csString pythonpath (getenv ("PYTHONPATH"));
+  pythonpath.Insert (0, CS_PATH_DELIMITER);
+  pythonpath.Insert (0, DEFAULT_PYTHMOD_PATH);
+  setenv ("PYTHONPATH", pythonpath, true);
 #endif
 
   Py_SetProgramName("Crystal Space -- Python");
@@ -126,6 +126,7 @@
   // Add cs python scripts folder to pythonpath
   csString cfg(csGetConfigPath());
   cmd << "sys.path.append('" << path_append(cfg, "scripts/python") << "')\n";
+  cmd << "sys.path.append('" << path_append(cfg, "frozen") << "')\n";
   if (!RunText (cmd)) return false;
 
   if (reporter && !LoadModule ("cshelper")) return false;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Crystal-main mailing list
Crystal-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to