Bug 1619788 - Ensure files generated by ./mach configure don't have CRLF line endings, even under Python 3 r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D65354
This commit is contained in:
Ricky Stewart
2020-03-06 02:19:21 +00:00
parent e392a52128
commit f5ccb58a49
8 changed files with 43 additions and 21 deletions

View File

@@ -5,6 +5,7 @@
from __future__ import absolute_import, print_function, unicode_literals
import codecs
import io
import itertools
import logging
import os
@@ -133,7 +134,8 @@ def config_status(config):
# Write out a file so the build backend knows to re-run configure when
# relevant Python changes.
with open('config_status_deps.in', 'w') as fh:
with io.open('config_status_deps.in', 'w', encoding='utf-8',
newline='\n') as fh:
for f in itertools.chain(config['CONFIG_STATUS_DEPS'],
iter_modules_in_path(config['TOPOBJDIR'],
config['TOPSRCDIR'])):