forked from mfkiwl/nassl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_unix.py
More file actions
executable file
·29 lines (20 loc) · 922 Bytes
/
setup_unix.py
File metadata and controls
executable file
·29 lines (20 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from distutils.core import setup, Extension
from sys import platform
from setup_config import NASSL_SETUP, NASSL_EXT_SETUP
from buildAll_config import OPENSSL_DIR, ZLIB_DIR
from buildAll_unix import OPENSSL_INSTALL_DIR
extra_compile_args = ['-Wall', '-Wno-deprecated-declarations']
if platform == 'darwin': # Workaround for Clang 3.4
# add as the element of an array rather than a string, py 2.7.5
extra_compile_args += ['-Wno-error=unused-command-line-argument-hard-error-in-future']
# Add arguments specific to Unix builds
unix_ext_args = NASSL_EXT_SETUP.copy()
unix_ext_args.update({
'include_dirs' : [OPENSSL_INSTALL_DIR + '/include'],
'extra_compile_args' : extra_compile_args,
'library_dirs' : [OPENSSL_DIR, ZLIB_DIR],
'libraries' : ['ssl', 'z', 'crypto']})
unix_setup = NASSL_SETUP.copy()
unix_setup.update({
'ext_modules' : [Extension(**unix_ext_args)] })
setup(**unix_setup)