Skip to content

Commit 3d59ab7

Browse files
committed
Remove support for Python 2
1 parent c3c510d commit 3d59ab7

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

README.md

+4-10
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,22 @@ Depending on your operating system, you will need to install:
3030

3131
### On Unix
3232

33-
* Python v2.7, v3.5, v3.6, v3.7, or v3.8
33+
* Python v3.5, v3.6, v3.7, v3.8, or v3.9
3434
* `make`
3535
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
3636

3737
### On macOS
3838

3939
**ATTENTION**: If your Mac has been _upgraded_ to macOS Catalina (10.15), please read [macOS_Catalina.md](macOS_Catalina.md).
4040

41-
* Python v2.7, v3.5, v3.6, v3.7, or v3.8
41+
* Python v3.5, v3.6, v3.7, v3.8, or v3.9
4242
* [Xcode](https://developer.apple.com/xcode/download/)
4343
* You also need to install the `XCode Command Line Tools` by running `xcode-select --install`. Alternatively, if you already have the full Xcode installed, you can find them under the menu `Xcode -> Open Developer Tool -> More Developer Tools...`. This step will install `clang`, `clang++`, and `make`.
4444

4545
### On Windows
4646

4747
Install the current version of Python from the [Microsoft Store package](https://docs.python.org/3/using/windows.html#the-microsoft-store-package).
4848

49-
#### Option 1
50-
51-
Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com./felixrieseberg/windows-build-tools) using `npm install --global windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
52-
53-
#### Option 2
54-
5549
Install tools and configuration manually:
5650
* Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)
5751
(using "Visual C++ build tools" workload) or [Visual Studio 2017 Community](https://visualstudio.microsoft.com/pl/thank-you-downloading-visual-studio/?sku=Community)
@@ -64,8 +58,8 @@ Install tools and configuration manually:
6458

6559
### Configuring Python Dependency
6660

67-
`node-gyp` requires that you have installed a compatible version of Python, one of: v2.7, v3.5, v3.6,
68-
v3.7, or v3.8. If you have multiple Python versions installed, you can identify which Python
61+
`node-gyp` requires that you have installed a compatible version of Python, one of: v3.5, v3.6,
62+
v3.7, v3.8, or v3.9. If you have multiple Python versions installed, you can identify which Python
6963
version `node-gyp` should use in one of the following ways:
7064

7165
1. by setting the `--python` command-line option, e.g.:

gyp/pylib/gyp/MSVSSettings.py

-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
_msvs_validators = {}
2323
_msbuild_validators = {}
2424

25-
2625
# A dictionary of settings converters. The key is the tool name, the value is
2726
# a dictionary mapping setting names to conversion functions.
2827
_msvs_to_msbuild_converters = {}
2928

30-
3129
# Tool name mapping from MSVS to MSBuild.
3230
_msbuild_name_of_tool = {}
3331

gyp/pylib/gyp/generator/android.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,9 @@ def WriteCopies(self, copies, extra_outputs):
486486
self.LocalPathify(os.path.join(copy["destination"], filename))
487487
)
488488

489-
self.WriteLn(f"{output}: {path} $(GYP_TARGET_DEPENDENCIES) | $(ACP)")
489+
self.WriteLn(
490+
f"{output}: {path} $(GYP_TARGET_DEPENDENCIES) | $(ACP)"
491+
)
490492
self.WriteLn("\t@echo Copying: $@")
491493
self.WriteLn("\t$(hide) mkdir -p $(dir $@)")
492494
self.WriteLn("\t$(hide) $(ACP) -rpf $< $@")

test/fixtures/test-charmap.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
import sys
32
import locale
43

@@ -18,9 +17,9 @@ def main():
1817
pass
1918

2019
textmap = {
21-
'cp936': u'\u4e2d\u6587',
22-
'cp1252': u'Lat\u012Bna',
23-
'cp932': u'\u306b\u307b\u3093\u3054'
20+
'cp936': '\u4e2d\u6587',
21+
'cp1252': 'Lat\u012Bna',
22+
'cp932': '\u306b\u307b\u3093\u3054'
2423
}
2524
if encoding in textmap:
2625
print(textmap[encoding])

0 commit comments

Comments
 (0)