blob: d95f0fdf835c9f3fca5e7c3b42e542b880f0b2bc [file] [log] [blame]
--- argon2_cffi-18.3.0/setup.py.orig 2018-08-19 07:46:22.000000000 -0400
+++ argon2_cffi-18.3.0/setup.py 2019-01-02 06:45:23.449755000 -0500
@@ -43,7 +43,8 @@ sources = [
# Add vendored integer types headers if necessary.
windows = "win32" in str(sys.platform).lower()
-if windows:
+is_mingw = ('GCC' in sys.version)
+if windows and (not is_mingw):
int_base = "extras/msinttypes/"
inttypes = int_base + "inttypes"
stdint = int_base + "stdint"
@@ -318,14 +319,24 @@ class BuildCLibWithCompilerFlags(build_c
# files in a temporary build directory.)
macros = build_info.get("macros")
include_dirs = build_info.get("include_dirs")
- objects = self.compiler.compile(
- sources,
- extra_preargs=["-msse2"] if optimized and not windows else [],
- output_dir=self.build_temp,
- macros=macros,
- include_dirs=include_dirs,
- debug=self.debug,
- )
+ if is_mingw:
+ objects = self.compiler.compile(
+ sources,
+ extra_preargs=["-msse2"] if optimized else [],
+ output_dir=self.build_temp,
+ macros=macros,
+ include_dirs=include_dirs,
+ debug=self.debug,
+ )
+ else:
+ objects = self.compiler.compile(
+ sources,
+ extra_preargs=["-msse2"] if optimized and not windows else [],
+ output_dir=self.build_temp,
+ macros=macros,
+ include_dirs=include_dirs,
+ debug=self.debug,
+ )
# Now "link" the object files together into a static library.
# (On Unix at least, this isn't really linking -- it just
--- argon2_cffi-18.3.0/src/argon2/_ffi_build.py.orig 2018-12-30 08:01:56.914788500 -0500
+++ argon2_cffi-18.3.0/src/argon2/_ffi_build.py 2018-12-30 08:04:48.966634200 -0500
@@ -12,7 +12,7 @@ if use_system_argon2:
include_dirs = []
# Add vendored integer types headers.
-if "win32" in str(sys.platform).lower():
+if ("win32" in str(sys.platform).lower()) and (not 'GCC' in sys.version):
int_base = os.path.join("extras", "msinttypes")
inttypes = os.path.join(int_base, "inttypes")
stdint = os.path.join(int_base, "stdint")