From b841786c39c1b8fc0fbad7d2d94f318ca1831b7f Mon Sep 17 00:00:00 2001 From: PaixuAabuizia Date: Sun, 24 Jan 2016 14:36:33 +0100 Subject: [bug] setup does only work with msvc compiler add compiler detection for msvc & mingw32 --- setup.py | 11 +++++++---- 1 file 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") -- cgit v1.2.3