File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -2154,6 +2154,21 @@ def build_cpython(
2154
2154
os .environ ,
2155
2155
)
2156
2156
2157
+ # The executables in the Scripts/ directory don't work because they reference
2158
+ # python.dll in the wrong path. You can run these via e.g. `python.exe -m pip`.
2159
+ # So just delete them for now.
2160
+ for filename in sorted (os .listdir (install_dir / "Scripts" )):
2161
+ assert filename .startswith ("pip" ) and filename .endswith (".exe" )
2162
+ p = install_dir / "Scripts" / filename
2163
+ log ("removing non-functional executable: %s" % p )
2164
+ os .unlink (p )
2165
+
2166
+ # But this leaves the Scripts directory empty, which we don't want. So
2167
+ # create a placeholder file to ensure the directory is created on archive
2168
+ # extract.
2169
+ with (install_dir / "Scripts" / ".empty" ).open ("ab" ):
2170
+ pass
2171
+
2157
2172
# Now copy the build artifacts into the output directory.
2158
2173
build_info = collect_python_build_artifacts (
2159
2174
pcbuild_path ,
Original file line number Diff line number Diff line change @@ -143,6 +143,20 @@ run time, the ``TCL_LIBRARY`` environment variable is set from within
143
143
the process before the Python interpreter is initialized. This ensures the
144
144
``.tcl `` files from the Python distribution are used.
145
145
146
+ .. _quirk_windows_no_pip :
147
+
148
+ No ``pip.exe `` on Windows
149
+ =========================
150
+
151
+ The Windows distributions have ``pip `` installed however no ``Scripts/pip.exe ``,
152
+ ``Scripts/pip3.exe ``, and ``Scripts/pipX.Y.exe `` files are provided because
153
+ the way these executables are built isn't portable. (It might be possible to
154
+ change how these are built to make them portable.)
155
+
156
+ To use pip, run ``python.exe -m pip ``. (It is generally a best practice to
157
+ invoke pip via ``python -m pip `` on all platforms so you can be explicit
158
+ about the ``python `` executable that pip uses.)
159
+
146
160
.. _quirk_macos_linking :
147
161
148
162
Linking Static Library on macOS
You can’t perform that action at this time.
0 commit comments