Skip to content

Commit 6f78aa9

Browse files
committed
global: rename some fields for consistency
Since version 5 is making a lot of changes, why don't we clean up some other fields.
1 parent bbd9435 commit 6f78aa9

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

cpython-unix/build-cpython.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ metadata = {
243243
"optimized_bytecode": importlib.machinery.OPTIMIZED_BYTECODE_SUFFIXES,
244244
"source": importlib.machinery.SOURCE_SUFFIXES,
245245
},
246-
"bytecode_magic_number": codecs.encode(importlib.util.MAGIC_NUMBER, "hex").decode("ascii"),
246+
"python_bytecode_magic_number": codecs.encode(importlib.util.MAGIC_NUMBER, "hex").decode("ascii"),
247247
"python_paths": {},
248248
"python_exe": "install/bin/python%s%s" % (sysconfig.get_python_version(), sys.abiflags),
249249
"python_major_minor_version": sysconfig.get_python_version(),

cpython-unix/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,8 @@ def build_cpython(
729729
"python_version": entry["version"],
730730
"python_stdlib_test_packages": sorted(STDLIB_TEST_PACKAGES),
731731
"python_symbol_visibility": python_symbol_visibility,
732-
"extension_module_loading": extension_module_loading,
733-
"link_mode": "static",
732+
"python_extension_module_loading": extension_module_loading,
733+
"libpython_link_mode": "static",
734734
"crt_features": crt_features,
735735
"run_tests": "build/run_tests.py",
736736
"build_info": python_build_info(

cpython-windows/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,8 +1900,8 @@ def build_cpython(python_entry_name: str, arch: str, sh_exe, profile):
19001900
"python_version": python_version,
19011901
"python_symbol_visibility": python_symbol_visibility,
19021902
"python_stdlib_test_packages": sorted(STDLIB_TEST_PACKAGES),
1903-
"extension_module_loading": extension_module_loading,
1904-
"link_mode": "static" if static else "shared",
1903+
"python_extension_module_loading": extension_module_loading,
1904+
"libpython_link_mode": "static" if static else "shared",
19051905
"crt_features": crt_features,
19061906
"build_info": build_info,
19071907
"licenses": entry["licenses"],

cpython-windows/generate_metadata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"optimized_bytecode": importlib.machinery.OPTIMIZED_BYTECODE_SUFFIXES,
2222
"source": importlib.machinery.SOURCE_SUFFIXES,
2323
},
24-
"bytecode_magic_number": codecs.encode(importlib.util.MAGIC_NUMBER, "hex").decode(
25-
"ascii"
26-
),
24+
"python_bytecode_magic_number": codecs.encode(
25+
importlib.util.MAGIC_NUMBER, "hex"
26+
).decode("ascii"),
2727
"python_paths": {},
2828
"python_exe": "install/python.exe",
2929
"python_major_minor_version": sysconfig.get_python_version(),

docs/distributions.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ python_suffixes
188188

189189
(Version 5 or above only.)
190190

191-
bytecode_magic_number
191+
python_bytecode_magic_number
192192
Magic number to use for bytecode files, expressed as a hexidecimal
193193
string.
194194

195195
(Version 5 or above only.)
196196

197-
link_mode
197+
libpython_link_mode
198198
How `libpython` is linked. Values can be one of the following:
199199

200200
`static`
@@ -204,7 +204,12 @@ link_mode
204204
Dynamically linked. (A `libpythonXY` shared library will be part
205205
of the distribution.)
206206

207-
(Version 4 or above only.)
207+
(Version 5 or above only.)
208+
209+
link_mode
210+
Alias of ``libpython_link_mode``.
211+
212+
(Version 4 or above only. Deprecated in version 5.)
208213

209214
python_symbol_visibility
210215
Defines how Python symbols are defined in binaries.
@@ -219,7 +224,7 @@ python_symbol_visibility
219224

220225
(Version 5 or above only.)
221226

222-
extension_module_loading
227+
python_extension_module_loading
223228
Defines support for loading Python extension modules.
224229

225230
The value is an array of strings denoting support for various

0 commit comments

Comments
 (0)