diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2009-07-20 16:55:35 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2009-07-20 16:55:35 -0400 |
commit | 61b0c430f1e4ec9e0b1c960b8ca4f2e945cf251b (patch) | |
tree | 39dc70af42eac0fa6d5402f5251ecabca0fa1a79 /setup.py | |
parent | 2d79b30b5c636a8a5621bad4e32258b0158cd1a0 (diff) | |
download | pyopenssl-61b0c430f1e4ec9e0b1c960b8ca4f2e945cf251b.tar.gz |
work with mingw32 and msvc
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -14,6 +14,7 @@ Installation script for the OpenSSL module import sys, os from distutils.core import Extension, setup + from glob import glob from version import __version__ @@ -42,7 +43,20 @@ LibraryDirs = None # Add more platforms here when needed if os.name == 'nt' or sys.platform == 'win32': - Libraries = ['eay32', 'ssl32', 'Ws2_32'] + + Libraries = ['Ws2_32'] + def makeTellMeIf(original, what): + class tellMeIf(original): + def __init__(*a, **kw): + Libraries.extend(what) + return original.__init__(*a, **kw) + return tellMeIf + + from distutils import cygwinccompiler + cygwinccompiler.Mingw32CCompiler = makeTellMeIf(cygwinccompiler.Mingw32CCompiler, ['eay32', 'ssl32']) + from distutils import msvccompiler + msvccompiler.MSVCCompiler = makeTellMeIf(msvccompiler.MSVCCompiler, ['libeay32', 'ssleay32']) + data_files = [('Lib\\site-packages\\OpenSSL', ['C:\\OpenSSL\\ssleay32.dll', 'C:\\OpenSSL\\libeay32.dll'])] else: Libraries = ['ssl', 'crypto'] |