diff --git a/setup.py b/setup.py index 5d49790..9c107b8 100644 --- a/setup.py +++ b/setup.py @@ -13,14 +13,14 @@ @contextlib.contextmanager def patched_path(path, old, new): - contents = path.read_text() + contents = path.read_text("latin-1") if old not in contents: raise Exception(f"Invalid patch: {old}") try: - path.write_text(contents.replace(old, new)) + path.write_text(contents.replace(old, new), "utf-8") yield finally: - path.write_text(contents) + path.write_text(contents, "latin-1") patches = [ @@ -29,9 +29,14 @@ def patched_path(path, old, new): ("Makefiles/Makefile_Mac_clang_shared", "$(COMPILE_FLAGS)", "$(COMPILE_FLAGS) $(CFLAGS)"), ("Makefiles/Makefile_Mac_clang_shared", - "-Wextra", "-Wextra -Wno-deprecated-declarations -Wno-sign-conversion"), + "-Wextra", + "-Wextra " + "-Wno-deprecated-declarations " + "-Wno-sign-conversion " + "-Wno-array-parameter"), ("Makefiles/Makefile_Mac_clang_shared", "$(LINK_FLAGS)", "$(LINK_FLAGS) -lc++"), + ("Moves.cpp", "", ""), # Only for reencoding. ]