Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows related fix #118

Merged
merged 2 commits into from Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/node-gyp.yml
Expand Up @@ -8,6 +8,8 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: [3.6, 3.9]

runs-on: ${{ matrix.os }}
steps:
- name: Clone gyp-next
Expand All @@ -24,7 +26,7 @@ jobs:
node-version: 14.x
- uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
cd node-gyp
Expand Down
5 changes: 1 addition & 4 deletions pylib/gyp/easy_xml.py
Expand Up @@ -123,10 +123,7 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False,

default_encoding = locale.getdefaultlocale()[1]
if default_encoding and default_encoding.upper() != encoding.upper():
if win32 and sys.version_info < (3, 7):
xml_string = xml_string.decode("cp1251").encode(encoding)
else:
xml_string = xml_string.encode(encoding)
xml_string = xml_string.encode(encoding)

# Get the old content
try:
Expand Down