Revert r88 and r89 - I was wrong
diff --git a/setup.py b/setup.py
index 19b0014..78c281f 100755
--- a/setup.py
+++ b/setup.py
@@ -43,8 +43,17 @@
# Add more platforms here when needed
if os.name == 'nt' or sys.platform == 'win32':
Libraries = ['eay32', 'Ws2_32']
+ # Try to find it...
+ for path in ["C:\\Python25\\libs\\", "C:\\Python26\\libs\\", "C:\\OpenSSL\\lib\\MinGW\\"]:
+ ssleay32 = os.path.join(path, "ssleay32.a")
+ if os.path.exists(ssleay32):
+ ExtraObjects = [ssleay32]
+ break
+ else:
+ raise SystemExit("Cannot find ssleay32.a, aborting")
else:
Libraries = ['ssl', 'crypto']
+ ExtraObjects = []
if sys.platform == 'darwin':
IncludeDirs = ['/sw/include']
@@ -52,8 +61,8 @@
# On Windows, make sure the necessary .dll's get added to the egg.
data_files = []
-# if sys.platform == 'win32':
-# data_files = [("OpenSSL", ExtraObjects)]
+if sys.platform == 'win32':
+ data_files = [("OpenSSL", ExtraObjects)]
def mkExtension(name):
@@ -61,7 +70,8 @@
src = globals()[name.lower() + '_src']
dep = globals()[name.lower() + '_dep']
return Extension(modname, src, libraries=Libraries, depends=dep,
- include_dirs=IncludeDirs, library_dirs=LibraryDirs)
+ include_dirs=IncludeDirs, library_dirs=LibraryDirs,
+ extra_objects=ExtraObjects)
setup(name='pyOpenSSL', version=__version__,
package_dir = {'OpenSSL': '.'},