+39
-155
lines changedFilter options
+39
-155
lines changed Original file line number Diff line number Diff line change
@@ -31,14 +31,6 @@ class macOSPythonBuilder : NixPythonBuilder {
31
31
.SYNOPSIS
32
32
Prepare system environment by installing dependencies and required packages.
33
33
#>
34
-
35
-
if ($this.Version -eq "3.7.17") {
36
-
# We have preinstalled ncurses and readLine on the hoster runners. But we need to install bzip2 for
37
-
# setting up an environemnt
38
-
# If we get any issues realted to ncurses or readline we can try to run this command
39
-
# brew install ncurses readline
40
-
Execute-Command -Command "brew install bzip2"
41
-
}
42
34
}
43
35
44
36
[void] Configure() {
@@ -58,46 +50,20 @@ class macOSPythonBuilder : NixPythonBuilder {
58
50
### will never be used itself by a Github Actions runner but using a universal2 Python is the only way to build
59
51
### universal2 C extensions and wheels. This is supported by Python >= 3.10 and was backported to Python >=
60
52
### 3.9.1 and >= 3.8.10.
61
-
### Disabled, discussion: https://github.com/actions/python-versions/pull/114
62
-
# if ($this.Version -ge "3.8.10" -and $this.Version -ne "3.8.13" -and $this.Version -ne "3.9.0" ) {
63
-
# $configureString += " --enable-universalsdk --with-universal-archs=universal2"
64
-
# }
65
53
66
54
### OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL.
67
55
### Solution is to install these libraries from a third-party package manager,
68
56
### and then add the appropriate paths for the header and library files to configure command.
69
57
### Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
70
-
if ($this.Version -lt "3.7.0") {
71
-
$env:LDFLAGS = "-L/usr/local/opt/openssl@3/lib -L/usr/local/opt/zlib/lib"
72
-
$env:CFLAGS = "-I/usr/local/opt/openssl@3/include -I/usr/local/opt/zlib/include"
73
-
} else {
74
-
$configureString += " --with-openssl=/usr/local/opt/openssl@3"
75
-
76
-
# For Python 3.7.2 and 3.7.3 we need to provide PATH for zlib to pack it properly. Otherwise the build will fail
77
-
# with the error: zipimport.ZipImportError: can't decompress data; zlib not available
78
-
if ($this.Version -eq "3.7.2" -or $this.Version -eq "3.7.3" -or $this.Version -eq "3.7.17") {
79
-
$env:LDFLAGS = "-L/usr/local/opt/zlib/lib"
80
-
$env:CFLAGS = "-I/usr/local/opt/zlib/include"
81
-
}
82
-
83
-
# if ($this.Version -gt "3.7.12") {
84
-
$configureString += " --with-tcltk-includes='-I /usr/local/opt/tcl-tk/include/tcl-tk' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'"
85
-
# }
86
-
87
-
if ($this.Version -eq "3.7.17") {
88
-
$env:LDFLAGS += " -L$(brew --prefix bzip2)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix ncurses)/lib"
89
-
$env:CFLAGS += " -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(brew --prefix ncurses)/include"
90
-
}
91
-
}
58
+
$configureString += " --with-openssl=/usr/local/opt/openssl@3"
59
+
$configureString += " --with-tcltk-includes='-I /usr/local/opt/tcl-tk/include/tcl-tk' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'"
92
60
93
-
### Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
61
+
### Compile with support of loadable sqlite extensions.
94
62
### Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
95
-
if ($this.Version -ge "3.2.0") {
96
-
$configureString += " --enable-loadable-sqlite-extensions"
97
-
$env:LDFLAGS += " -L$(brew --prefix sqlite3)/lib"
98
-
$env:CFLAGS += " -I$(brew --prefix sqlite3)/include"
99
-
$env:CPPFLAGS += "-I$(brew --prefix sqlite3)/include"
100
-
}
63
+
$configureString += " --enable-loadable-sqlite-extensions"
64
+
$env:LDFLAGS += " -L$(brew --prefix sqlite3)/lib"
65
+
$env:CFLAGS += " -I$(brew --prefix sqlite3)/include"
66
+
$env:CPPFLAGS += "-I$(brew --prefix sqlite3)/include"
101
67
102
68
Write-Host "The passed configure options are: "
103
69
Write-Host $configureString
Original file line number Diff line number Diff line change
@@ -61,8 +61,7 @@ class NixPythonBuilder : PythonBuilder {
61
61
Return name of Python binary.
62
62
#>
63
63
64
-
if ($this.Version.Major -eq 2) { $pythonBinary = "python" } else { $pythonBinary = "python3" }
65
-
return $pythonBinary
64
+
return "python3"
66
65
}
67
66
68
67
[string] Download() {
Original file line number Diff line number Diff line change
@@ -61,8 +61,8 @@ class UbuntuPythonBuilder : NixPythonBuilder {
61
61
Prepare system environment by installing dependencies and required packages.
62
62
#>
63
63
64
-
if ($this.Version -lt "3.5.3") {
65
-
Write-Host "Python versions lower than 3.5.3 are not supported"
64
+
if ($this.Version -lt "3.9.0") {
65
+
Write-Host "Python versions lower than 3.9.0 are not supported"
66
66
exit 1
67
67
}
68
68
Original file line number Diff line number Diff line change
@@ -42,9 +42,7 @@ class WinPythonBuilder : PythonBuilder {
42
42
Return extension for required version of Python executable.
43
43
#>
44
44
45
-
$extension = if ($this.Version -lt "3.5" -and $this.Version -ge "2.5") { ".msi" } else { ".exe" }
46
-
47
-
return $extension
45
+
return ".exe"
48
46
}
49
47
50
48
[string] GetArchitectureExtension() {
@@ -55,11 +53,7 @@ class WinPythonBuilder : PythonBuilder {
55
53
56
54
$ArchitectureExtension = ""
57
55
if ($this.GetHardwareArchitecture() -eq "x64") {
58
-
if ($this.Version -ge "3.5") {
59
-
$ArchitectureExtension = "-amd64"
60
-
} else {
61
-
$ArchitectureExtension = ".amd64"
62
-
}
56
+
$ArchitectureExtension = "-amd64"
63
57
} elseif ($this.GetHardwareArchitecture() -eq "arm64") {
64
58
$ArchitectureExtension = "-arm64"
65
59
}
Original file line number Diff line number Diff line change
@@ -11,12 +11,7 @@ function Get-RegistryVersionFilter {
11
11
)
12
12
13
13
$archFilter = if ($Architecture -eq 'x86') { "32-bit" } else { "64-bit" }
14
-
### Python 2.7 x86 have no architecture postfix
15
-
if (($Architecture -eq "x86") -and ($MajorVersion -eq 2)) {
16
-
"Python $MajorVersion.$MinorVersion.\d+$"
17
-
} else {
18
-
"Python $MajorVersion.$MinorVersion.*($archFilter)"
19
-
}
14
+
"Python $MajorVersion.$MinorVersion.*($archFilter)"
20
15
}
21
16
22
17
function Remove-RegistryEntries {
@@ -143,9 +138,7 @@ if ($IsFreeThreaded) {
143
138
}
144
139
145
140
Write-Host "Create `python3` symlink"
146
-
if ($MajorVersion -ne "2") {
147
-
New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe"
148
-
}
141
+
New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe"
149
142
150
143
Write-Host "Install and upgrade Pip"
151
144
$Env:PIP_ROOT_USER_ACTION = "ignore"
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ Describe "Tests" {
60
60
# }
61
61
# }
62
62
63
-
if (($Version -ge "3.2.0") -and ($Version -lt "3.11.0") -and (($Platform -ne "darwin") -or ($HardwareArchitecture -ne "arm64"))) {
63
+
if (($Version -lt "3.11.0") -and (($Platform -ne "darwin") -or ($HardwareArchitecture -ne "arm64"))) {
64
64
It "Check if sqlite3 module is installed" {
65
65
"python ./sources/python-sqlite3.py" | Should -ReturnZeroExitCode
66
66
}
@@ -92,16 +92,6 @@ Describe "Tests" {
92
92
}
93
93
}
94
94
95
-
# Pyinstaller 3.5 does not support Python 3.8.0. Check issue https://github.com/pyinstaller/pyinstaller/issues/4311
96
-
if ($Version -lt "3.8.0" -and $Version.Major -ne "2") {
97
-
It "Validate Pyinstaller" {
98
-
"pip install pyinstaller" | Should -ReturnZeroExitCode
99
-
"pyinstaller --onefile ./sources/simple-test.py" | Should -ReturnZeroExitCode
100
-
$distPath = [IO.Path]::Combine($pwd, "dist", "simple-test")
101
-
"$distPath" | Should -ReturnZeroExitCode
102
-
}
103
-
}
104
-
105
95
It "Check urlopen with HTTPS works" {
106
96
"python ./sources/python-urlopen-https.py" | Should -ReturnZeroExitCode
107
97
}
Original file line number Diff line number Diff line change
@@ -3,12 +3,10 @@
3
3
This is needed for Linux since we build from source.
4
4
"""
5
5
6
-
from __future__ import print_function
7
-
8
6
import importlib
9
7
import sys
10
8
11
-
# The Python standard library as of Python 3.0
9
+
# The Python standard library as of Python 3.9
12
10
standard_library = [
13
11
'abc',
14
12
'aifc',
@@ -17,6 +15,7 @@
17
15
'ast',
18
16
'asynchat',
19
17
'asyncore',
18
+
'asyncio',
20
19
'base64',
21
20
'bdb',
22
21
'binhex',
@@ -34,24 +33,29 @@
34
33
'collections',
35
34
'colorsys',
36
35
'compileall',
36
+
'concurrent',
37
37
'configparser',
38
38
'contextlib',
39
+
'contextvars',
39
40
'copy',
40
41
'copyreg',
41
42
'crypt',
42
43
'csv',
43
44
'ctypes',
44
45
'curses',
46
+
'dataclasses',
45
47
'datetime',
46
48
'dbm',
47
49
'decimal',
48
50
'difflib',
49
51
'dis',
50
52
'distutils',
51
53
'doctest',
52
-
'dummy_threading',
53
54
'email',
54
55
'encodings',
56
+
'ensurepip',
57
+
'enum',
58
+
'faulthandler',
55
59
'filecmp',
56
60
'fileinput',
57
61
'fnmatch',
@@ -77,13 +81,14 @@
77
81
'importlib',
78
82
'inspect',
79
83
'io',
84
+
'ipaddress',
80
85
'json',
81
86
'keyword',
82
87
'lib2to3',
83
88
'linecache',
84
89
'locale',
85
90
'logging',
86
-
'macpath',
91
+
'lzma',
87
92
'mailbox',
88
93
'mailcap',
89
94
'mimetypes',
@@ -98,6 +103,7 @@
98
103
'operator',
99
104
'optparse',
100
105
'os',
106
+
'pathlib',
101
107
'pdb',
102
108
'pickle',
103
109
'pickletools',
@@ -124,6 +130,8 @@
124
130
'rlcompleter',
125
131
'runpy',
126
132
'sched',
133
+
'secrets',
134
+
'selectors',
127
135
'shelve',
128
136
'shlex',
129
137
'shutil',
@@ -141,6 +149,7 @@
141
149
'ssl',
142
150
'_ssl',
143
151
'stat',
152
+
'statistics',
144
153
'string',
145
154
'stringprep',
146
155
'struct',
@@ -163,14 +172,17 @@
163
172
'tokenize',
164
173
'trace',
165
174
'traceback',
175
+
'tracemalloc',
166
176
'tty',
167
177
'turtle',
168
178
'turtledemo',
169
179
'types',
180
+
'typing',
170
181
'unittest',
171
182
'urllib',
172
183
'uu',
173
184
'uuid',
185
+
'venv',
174
186
'warnings',
175
187
'wave',
176
188
'weakref',
@@ -179,83 +191,12 @@
179
191
'xdrlib',
180
192
'xml',
181
193
'xmlrpc',
194
+
'zipapp',
182
195
'zipfile'
183
196
]
184
197
185
-
# Modules that had different names in Python 2
186
-
if sys.version_info.major == 2:
187
-
def replace(lst, old, new):
188
-
lst[lst.index(old)] = new
189
-
190
-
# Keys are the Python 2 names
191
-
# Values are the Python 3 names
192
-
renames = {
193
-
'ConfigParser': 'configparser',
194
-
'copy_reg': 'copyreg',
195
-
'HTMLParser': 'html',
196
-
'httplib': 'http',
197
-
'Queue': 'queue',
198
-
'repr': 'reprlib',
199
-
'SocketServer': 'socketserver',
200
-
'xmlrpclib': 'xmlrpc',
201
-
'Tkinter': 'tkinter'
202
-
}
203
-
204
-
# All of the Python 3 names should be in the list
205
-
for python2name, python3name in renames.items():
206
-
replace(standard_library, python3name, python2name)
207
-
208
198
# Add new modules
209
199
# See https://docs.python.org/3/whatsnew/index.html
210
-
if sys.version_info >= (3, 2):
211
-
standard_library.extend([
212
-
'concurrent',
213
-
])
214
-
215
-
if sys.version_info >= (3, 3):
216
-
standard_library.extend([
217
-
'ipaddress',
218
-
'faulthandler',
219
-
'lzma',
220
-
'venv',
221
-
])
222
-
223
-
if sys.version_info >= (3, 4):
224
-
standard_library.extend([
225
-
'asyncio',
226
-
'ensurepip',
227
-
'enum',
228
-
'pathlib',
229
-
'selectors',
230
-
'statistics',
231
-
'tracemalloc',
232
-
])
233
-
234
-
if sys.version_info >= (3, 5):
235
-
standard_library.extend([
236
-
'typing',
237
-
'zipapp',
238
-
])
239
-
240
-
if sys.version_info >= (3, 6):
241
-
standard_library.extend([
242
-
'secrets',
243
-
])
244
-
245
-
if sys.version_info >= (3, 7):
246
-
standard_library.extend([
247
-
'contextvars',
248
-
'dataclasses',
249
-
])
250
-
251
-
# 'macpath' module has been removed from Python 3.8
252
-
if sys.version_info > (3, 7):
253
-
standard_library.remove('macpath')
254
-
255
-
# 'dummy_threading' module has been removed from Python 3.9
256
-
if sys.version_info > (3, 8):
257
-
standard_library.remove('dummy_threading')
258
-
259
200
# 'symbol' and 'formatter' modules have been removed from Python 3.10
260
201
if sys.version_info >= (3, 10):
261
202
standard_library.remove('symbol')
@@ -295,6 +236,11 @@ def replace(lst, old, new):
295
236
standard_library.remove('uu')
296
237
standard_library.remove('xdrlib')
297
238
239
+
if sys.version_info >= (3, 14):
240
+
standard_library.extend([
241
+
'annotationlib',
242
+
])
243
+
298
244
# Remove tkinter and Easter eggs
299
245
excluded_modules = [
300
246
'antigravity',
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
1
1
import sys
2
-
3
-
if sys.version_info[0] == 2:
4
-
from urllib2 import urlopen
5
-
else:
6
-
from urllib.request import urlopen
2
+
from urllib.request import urlopen
7
3
8
4
response = urlopen("https://raw.githubusercontent.com/actions/python-versions/c641695f6a07526c18f10e374e503e649fef9427/.gitignore")
9
5
data = response.read()
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4