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

Brand new find-python.js #2428

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
42d1bf2
lib, gyp: add support for non-eanglish letters in pathes
owl-from-hogvarts Nov 6, 2020
0f499bd
test: add unit test for find-python-script.py
owl-from-hogvarts Nov 22, 2020
f18491e
lib: reinvent find-python.js script
owl-from-hogvarts Dec 24, 2020
debeac8
test: add test for lib/new-find-python.js
owl-from-hogvarts Dec 24, 2020
43c3571
test, lib: rename new-find-python.js and test-new-find-python.js
owl-from-hogvarts Dec 24, 2020
6ed7ed1
test: fix test-find-python-script.js and test-find-python.js
owl-from-hogvarts Dec 24, 2020
462fcc4
gyp: fix utf8 encoding
owl-from-hogvarts Dec 24, 2020
93cf5ed
lib: improve comments
owl-from-hogvarts Jan 27, 2021
7943953
lib: fixed spelling errors in comments
owl-from-hogvarts Jan 29, 2021
e8829bb
test, lib: fix spelling errors, minor changes
owl-from-hogvarts Apr 12, 2021
dc580b9
lib: fix lint error on ubuntu
owl-from-hogvarts Apr 12, 2021
f26edde
lib: remove unnecessary "else"
cclauss Apr 13, 2021
461fa2c
test: remove python2 support in tests
owl-from-hogvarts Apr 13, 2021
96b4119
lib, test: general improvements related to find-python.js
owl-from-hogvarts Apr 15, 2021
ba150bc
test: fix quotes check on POSIX systems
owl-from-hogvarts Apr 15, 2021
7edd0db
test: add test with utf-8 string in path
owl-from-hogvarts May 4, 2021
f4cd261
test: fix "`fs.rmSync` is not a function" for old node.js versions
owl-from-hogvarts May 5, 2021
3ed6418
chore: remove unnecessary comment, fix spelling errors
owl-from-hogvarts May 4, 2021
2a2ad82
chore: use `LF` endings
owl-from-hogvarts May 20, 2021
3c106d7
chore: clarification comments
owl-from-hogvarts Jun 3, 2021
3a4cc86
chore: use `&&` or `||` instead of `?`
owl-from-hogvarts Jun 3, 2021
d56bec1
lib: reinvent log system in find-python.js
owl-from-hogvarts May 6, 2021
826f391
fix: properly display `optionObj`
owl-from-hogvarts Jun 4, 2021
00d4773
chore: clarification comment
owl-from-hogvarts Jun 4, 2021
c561192
chore: remove comma
owl-from-hogvarts Jun 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion gyp/pylib/gyp/easy_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import sys
import re
import os
import locale
Expand Down Expand Up @@ -121,7 +122,10 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False, win32=False

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

# Get the old content
try:
Expand Down
2 changes: 1 addition & 1 deletion gyp/pylib/gyp/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check
return data[build_file_path]

if os.path.exists(build_file_path):
build_file_contents = open(build_file_path).read()
build_file_contents = open(build_file_path, encoding='utf-8').read()
else:
raise GypError(f"{build_file_path} not found (cwd: {os.getcwd()})")

Expand Down
4 changes: 4 additions & 0 deletions lib/find-python-script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import sys
if sys.stdout.encoding != "utf-8" and sys.platform == "win32":
sys.stdout.reconfigure(encoding='utf-8')
print(sys.executable)
Loading