[Zope-CVS] CVS: Packages/Spread - setup.py:1.3

Guido van Rossum guido@python.org
Tue, 18 Dec 2001 23:11:47 -0500


Update of /cvs-repository/Packages/Spread
In directory cvs.zope.org:/tmp/cvs-serv20159

Modified Files:
	setup.py 
Log Message:
Make it build on Windows.

=== Packages/Spread/setup.py 1.2 => 1.3 ===
 # INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
 
+import os
 from distutils.core import setup, Extension
 
-SPREAD_DIR = "/usr/local/spread"
-
-ext = Extension('spread', ['spreadmodule.c'],
+if os.name == 'nt':
+    SPREAD_DIR = "\\code\\standby\\spread-bin-3.16.1"
+    ext = Extension('spread', ['spreadmodule.c'],
+                include_dirs = [SPREAD_DIR + "/include"],
+                library_dirs = [SPREAD_DIR + "/win"],
+                libraries = ['libtsp', 'wsock32'],
+                extra_link_args = ['/NODEFAULTLIB:libc'],
+                )
+else:
+    SPREAD_DIR = "/usr/local/spread"
+    ext = Extension('spread', ['spreadmodule.c'],
                 include_dirs = [SPREAD_DIR + "/include"],
                 library_dirs = [SPREAD_DIR + "/lib"],
                 libraries = ['tsp'],