summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaixuAabuizia <PaixuAabuizia@users.noreply.github.com>2016-01-24 14:36:33 +0100
committerPaixuAabuizia <PaixuAabuizia@users.noreply.github.com>2016-01-24 14:36:33 +0100
commitb841786c39c1b8fc0fbad7d2d94f318ca1831b7f (patch)
tree3ab74484f4b43bbcb352569f10b77e0222167d89
parent34659f76b7e7c61ecb998a3478286f3fb4a338b9 (diff)
[bug] setup does only work with msvc compiler
add compiler detection for msvc & mingw32
-rw-r--r--setup.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 6db3492..80e5918 100644
--- a/setup.py
+++ b/setup.py
@@ -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")