From 90cf3ec502c111c23504cb06d94391d11398e626 Mon Sep 17 00:00:00 2001 From: Alyssa Coghlan Date: Mon, 4 Nov 2024 14:26:53 +1000 Subject: [PATCH] Force site customization encoding and newlines --- src/venvstacks/stacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/venvstacks/stacks.py b/src/venvstacks/stacks.py index fe4c939..f9da726 100755 --- a/src/venvstacks/stacks.py +++ b/src/venvstacks/stacks.py @@ -1659,11 +1659,11 @@ def _generate_sitecustomize(self) -> None: ) sc_path = self.pylib_path / "sitecustomize.py" print(f"Generating {sc_path!r}...") - sc_path.write_text(sc_contents) + sc_path.write_text(sc_contents, encoding="utf-8", newline="\n") deployed_sc_path = self.sitecustomize_source_path assert deployed_sc_path is not None print(f"Generating {deployed_sc_path!r}...") - deployed_sc_path.write_text(deployed_sc_contents) + deployed_sc_path.write_text(deployed_sc_contents, encoding="utf-8", newline="\n") def _update_existing_environment(self, *, lock_only: bool = False) -> None: super()._update_existing_environment(lock_only=lock_only)