32 lines
1.3 KiB
Diff
Executable File
32 lines
1.3 KiB
Diff
Executable File
diff --git a/setup.py b/setup.py
|
|
index 89ddd252..950dd8bc 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -220,7 +220,7 @@ class BuildLibrary(build_ext):
|
|
]
|
|
|
|
|
|
- if platform.system() == "Windows":
|
|
+ if platform.system() == "Windows" and not sysconfig.get_platform().startswith("mingw"):
|
|
from setuptools import msvc
|
|
|
|
cmake_args += [
|
|
@@ -260,7 +260,7 @@ class BuildLibrary(build_ext):
|
|
if self.distribution.doc:
|
|
targets['doc'] = "lief-doc"
|
|
|
|
- if platform.system() == "Windows":
|
|
+ if platform.system() == "Windows" and not sysconfig.get_platform().startswith("mingw"):
|
|
build_cmd = ['cmake', '--build', '.', '--target', "lief_samples"] + build_args
|
|
#log.info(" ".join(build_cmd))
|
|
|
|
@@ -318,7 +318,7 @@ class BuildLibrary(build_ext):
|
|
libsuffix = pylief_dst.split(".")[-1]
|
|
|
|
pylief_path = os.path.join(cmake_library_output_directory, "{}.{}".format(PACKAGE_NAME, libsuffix))
|
|
- if platform.system() == "Windows":
|
|
+ if platform.system() == "Windows" and not sysconfig.get_platform().startswith("mingw"):
|
|
pylief_base = pathlib.Path(cmake_library_output_directory) / "Release" / "api" / "python"
|
|
pylief_path = pylief_base / "Release" / "{}.{}".format(PACKAGE_NAME, libsuffix)
|
|
if not pylief_path.is_file():
|