diff options
author | PaixuAabuizia <PaixuAabuizia@users.noreply.github.com> | 2016-01-24 14:36:33 +0100 |
---|---|---|
committer | PaixuAabuizia <PaixuAabuizia@users.noreply.github.com> | 2016-01-24 14:36:33 +0100 |
commit | b841786c39c1b8fc0fbad7d2d94f318ca1831b7f (patch) | |
tree | 3ab74484f4b43bbcb352569f10b77e0222167d89 | |
parent | 34659f76b7e7c61ecb998a3478286f3fb4a338b9 (diff) |
[bug] setup does only work with msvc compiler
add compiler detection for msvc & mingw32
-rw-r--r-- | setup.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -192,10 +192,13 @@ class MyBuildExt(build_ext): ext.define_macros.append(("inline", "__inline")) # Configure the linker - ext.extra_link_args.append("libeay32.lib") - ext.extra_link_args.append( - "/LIBPATH:" + os.path.join(openssl, "lib") - ) + if self.compiler.compiler_type == "msvc": + ext.extra_link_args.append("libeay32.lib") + ext.extra_link_args.append( + "/LIBPATH:" + os.path.join(openssl, "lib") + ) + if self.compiler.compiler_type == "mingw32": + ext.extra_link_args.append("-lcrypto") else: ext.extra_link_args.append("-lcrypto") |