forked from thomasd57/django-1and1
-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py.patch
50 lines (49 loc) · 2.62 KB
/
setup.py.patch
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- setup.py 2017-10-03 01:52:02.000000000 -0400
+++ /patched/setup.py 2018-01-22 14:23:23.071041205 -0500
@@ -811,9 +811,9 @@
exts.append( Extension('_socket', ['socketmodule.c'],
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
+ SSL = os.environ['SSL_DIR']
search_for_ssl_incs_in = [
- '/usr/local/ssl/include',
- '/usr/contrib/ssl/include/'
+ os.path.join(SSL, 'include'),
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
@@ -824,16 +824,16 @@
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
- ['/usr/local/ssl/lib',
- '/usr/contrib/ssl/lib/'
+ [ os.path.join(SSL, 'lib')
] )
if (ssl_incs is not None and
ssl_libs is not None):
exts.append( Extension('_ssl', ['_ssl.c'],
- include_dirs = ssl_incs,
- library_dirs = ssl_libs,
- libraries = ['ssl', 'crypto'],
+ library_dirs = [],
+ extra_link_args = [ os.path.join(SSL, 'lib/libssl.a'),
+ os.path.join(SSL, 'lib/libcrypto.a'),
+ '-ldl'],
depends = ['socketmodule.h']), )
else:
missing.append('_ssl')
@@ -873,8 +873,11 @@
exts.append( Extension('_hashlib', ['_hashopenssl.c'],
depends = ['hashlib.h'],
include_dirs = ssl_incs,
- library_dirs = ssl_libs,
- libraries = ['ssl', 'crypto']) )
+ library_dirs = [],
+ extra_link_args = [ os.path.join(SSL, 'lib/libssl.a'),
+ os.path.join(SSL, 'lib/libcrypto.a'),
+ '-ldl'],
+ ) )
else:
print("warning: openssl 0x%08x is too old for _hashlib" %
openssl_ver)