[omniORB] Python needed for Win32 VC8 binary distribution (4.0.7)?

Peter Klotz peter.klotz at aon.at
Fri Apr 21 18:43:04 BST 2006


Hi Greco

> I have installed the binary distribution 4.0.7 for Windows, VC8, and 
> although the documentation states that I do not need to install the full 
> version of Python, I’m starting to have my doubts if that is true.
> 
>  
> 
> Dependency walker tells me that omniidl.exe depends on python24.dll 
> which is not in the distribution. Obviously it is also not in the 
> omnipython package that is four years old now and doesn’t seem to get 
> updated (it's on python 1.5).
> 
>  
> 
> I don’t want to make my workspace more complex than it already is by 
> having to install extra tools that I might not really need. Installing 
> being the key word here; unzipping and setting some environment 
> variables would be acceptable if that’s what it takes. (I would like to 
> be able to put the entire working folder including all tools like 
> omniorb in a version control database. Someone else should be able to 
> get a local copy, run a “setprojectenvironment.bat” file and compile the 
> whole thing. We want to avoid installing software "the Windows way" as 
> much as possible).
> 

As long as you are compiling for x86 (not x64) Windows you can download 
a binary version of Python 2.4.3 from http://www.python.org/ and take 
these files from the distribution:

	python24.dll
         copy_reg.py
         getopt.py
         ntpath.py
         os.py
         re.py
         sre.py
         sre_compile.py
         sre_constants.py
         sre_parse.py
         stat.py
         string.py
         types.py
         UserDict.py

Just copy all these files into the directory where omniidl.exe is located.

When you add an empty site.py file you can suppress the 'import site 
failed' message displayed by Python.

You only have to compile Python yourself when compiling for x64 Windows 
since no binary Python distribution for this platform exists for download.

In this case you need the attached patch since Python compiles out of 
the box with cl 14.00 (VS2005) but it crashes when starting up.

Best regards, Peter.
-------------- next part --------------
diff -burN Python-2.4.3/Python/pythonrun.c Python-2.4.3.patched/Python/pythonrun.c
--- Python-2.4.3/Python/pythonrun.c	2005-03-29 14:32:50.000000000 +0200
+++ Python-2.4.3.patched/Python/pythonrun.c	2005-12-06 09:42:46.265625000 +0100
@@ -1654,6 +1654,23 @@
 	return context.sa_handler;
 #else
 	PyOS_sighandler_t handler;
+/* Special signal handling for the secure CRT in Visual Studio 2005 */
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+	switch (sig) {
+	/* Only these signals are valid */
+	case SIGINT:
+	case SIGILL:
+	case SIGFPE:
+	case SIGSEGV:
+	case SIGTERM:
+	case SIGBREAK:
+	case SIGABRT:
+		break;
+	/* Don't call signal() with other values or it will assert */
+	default:
+		return SIG_ERR;
+	}
+#endif /* _MSC_VER && _MSC_VER >= 1400 */
 	handler = signal(sig, SIG_IGN);
 	if (handler != SIG_ERR)
 		signal(sig, handler);


More information about the omniORB-list mailing list