diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2009-07-21 11:12:52 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2009-07-21 11:12:52 -0400 |
commit | e0d94c8ce0310d29a91025ade9878da180a917df (patch) | |
tree | 78241d9dcabd989024bc13bd7d78728b4e004960 /setup.py | |
parent | 61b0c430f1e4ec9e0b1c960b8ca4f2e945cf251b (diff) | |
download | pyopenssl-git-e0d94c8ce0310d29a91025ade9878da180a917df.tar.gz |
Use package_data instead of data_files to put the dlls into the package; this should cause them to end up in the right place more often
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -14,7 +14,6 @@ Installation script for the OpenSSL module import sys, os from distutils.core import Extension, setup - from glob import glob from version import __version__ @@ -57,10 +56,13 @@ if os.name == 'nt' or sys.platform == 'win32': 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'])] + import shutil + shutil.copy("C:\\OpenSSL\\ssleay32.dll", os.path.split(os.path.abspath(__file__))[0]) + shutil.copy("C:\\OpenSSL\\libeay32.dll", os.path.split(os.path.abspath(__file__))[0]) + package_data = {'': ['ssleay32.dll', 'libeay32.dll']} else: Libraries = ['ssl', 'crypto'] - data_files = [] + package_data = {} def mkExtension(name): @@ -70,7 +72,9 @@ def mkExtension(name): return Extension(modname, src, libraries=Libraries, depends=dep, include_dirs=IncludeDirs, library_dirs=LibraryDirs) + setup(name='pyOpenSSL', version=__version__, + packages = ['OpenSSL'], package_dir = {'OpenSSL': '.'}, ext_modules = [mkExtension('crypto'), mkExtension('rand'), mkExtension('SSL')], @@ -78,7 +82,7 @@ setup(name='pyOpenSSL', version=__version__, 'OpenSSL.version', 'OpenSSL.test.__init__', 'OpenSSL.test.test_crypto', 'OpenSSL.test.test_ssl'], - data_files = data_files, + package_data = package_data, description = 'Python wrapper module around the OpenSSL library', author = 'Martin Sjögren, AB Strakt', author_email = 'msjogren@gmail.com', |