Browse Source
bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029)
pull/11085/head
bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029)
pull/11085/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 452 additions and 53 deletions
-
17Doc/library/venv.rst
-
10Doc/whatsnew/3.7.rst
-
1Lib/test/test_venv.py
-
49Lib/venv/__init__.py
-
2Misc/NEWS.d/next/Windows/2018-12-07-10-00-38.bpo-34977.agQJbD.rst
-
8PC/getpathp.c
-
223PC/launcher.c
-
2PCbuild/pcbuild.proj
-
85PCbuild/venvlauncher.vcxproj
-
85PCbuild/venvwlauncher.vcxproj
-
23Tools/msi/lib/lib_files.wxs
@ -0,0 +1,2 @@ |
|||
venv on Windows will now use a python.exe redirector rather than copying the |
|||
actual binaries from the base environment. |
|||
@ -0,0 +1,85 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<ItemGroup Label="ProjectConfigurations"> |
|||
<ProjectConfiguration Include="Debug|Win32"> |
|||
<Configuration>Debug</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Debug|x64"> |
|||
<Configuration>Debug</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGInstrument|Win32"> |
|||
<Configuration>PGInstrument</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGInstrument|x64"> |
|||
<Configuration>PGInstrument</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGUpdate|Win32"> |
|||
<Configuration>PGUpdate</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGUpdate|x64"> |
|||
<Configuration>PGUpdate</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Release|Win32"> |
|||
<Configuration>Release</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Release|x64"> |
|||
<Configuration>Release</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
</ItemGroup> |
|||
<PropertyGroup Label="Globals"> |
|||
<ProjectGuid>{494BAC80-A60C-43A9-99E7-ACB691CE2C4D}</ProjectGuid> |
|||
<RootNamespace>venvlauncher</RootNamespace> |
|||
<TargetName>venvlauncher</TargetName> |
|||
<SupportPGO>false</SupportPGO> |
|||
</PropertyGroup> |
|||
<Import Project="python.props" /> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|||
<PropertyGroup Label="Configuration"> |
|||
<ConfigurationType>Application</ConfigurationType> |
|||
<CharacterSet>MultiByte</CharacterSet> |
|||
</PropertyGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|||
<ImportGroup Label="ExtensionSettings"> |
|||
</ImportGroup> |
|||
<PropertyGroup> |
|||
<MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget> |
|||
</PropertyGroup> |
|||
<ImportGroup Label="PropertySheets"> |
|||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|||
<Import Project="pyproject.props" /> |
|||
</ImportGroup> |
|||
<PropertyGroup Label="UserMacros" /> |
|||
<ItemDefinitionGroup> |
|||
<ClCompile> |
|||
<PreprocessorDefinitions>_CONSOLE;VENV_REDIRECT;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
|||
</ClCompile> |
|||
<ResourceCompile> |
|||
<PreprocessorDefinitions>PY_ICON;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|||
</ResourceCompile> |
|||
<Link> |
|||
<AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|||
<SubSystem>Console</SubSystem> |
|||
</Link> |
|||
</ItemDefinitionGroup> |
|||
<ItemGroup> |
|||
<ClCompile Include="..\PC\launcher.c" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="..\PC\launcher.ico" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ResourceCompile Include="..\PC\pylauncher.rc" /> |
|||
</ItemGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|||
<ImportGroup Label="ExtensionTargets"> |
|||
</ImportGroup> |
|||
</Project> |
|||
@ -0,0 +1,85 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<ItemGroup Label="ProjectConfigurations"> |
|||
<ProjectConfiguration Include="Debug|Win32"> |
|||
<Configuration>Debug</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Debug|x64"> |
|||
<Configuration>Debug</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGInstrument|Win32"> |
|||
<Configuration>PGInstrument</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGInstrument|x64"> |
|||
<Configuration>PGInstrument</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGUpdate|Win32"> |
|||
<Configuration>PGUpdate</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="PGUpdate|x64"> |
|||
<Configuration>PGUpdate</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Release|Win32"> |
|||
<Configuration>Release</Configuration> |
|||
<Platform>Win32</Platform> |
|||
</ProjectConfiguration> |
|||
<ProjectConfiguration Include="Release|x64"> |
|||
<Configuration>Release</Configuration> |
|||
<Platform>x64</Platform> |
|||
</ProjectConfiguration> |
|||
</ItemGroup> |
|||
<PropertyGroup Label="Globals"> |
|||
<ProjectGuid>{FDB84CBB-2FB6-47C8-A2D6-091E0833239D}</ProjectGuid> |
|||
<RootNamespace>venvwlauncher</RootNamespace> |
|||
<TargetName>venvwlauncher</TargetName> |
|||
<SupportPGO>false</SupportPGO> |
|||
</PropertyGroup> |
|||
<Import Project="python.props" /> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|||
<PropertyGroup Label="Configuration"> |
|||
<ConfigurationType>Application</ConfigurationType> |
|||
<CharacterSet>MultiByte</CharacterSet> |
|||
</PropertyGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|||
<ImportGroup Label="ExtensionSettings"> |
|||
</ImportGroup> |
|||
<PropertyGroup> |
|||
<MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget> |
|||
</PropertyGroup> |
|||
<ImportGroup Label="PropertySheets"> |
|||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|||
<Import Project="pyproject.props" /> |
|||
</ImportGroup> |
|||
<PropertyGroup Label="UserMacros" /> |
|||
<ItemDefinitionGroup> |
|||
<ClCompile> |
|||
<PreprocessorDefinitions>_WINDOWS;VENV_REDIRECT;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
|||
</ClCompile> |
|||
<ResourceCompile> |
|||
<PreprocessorDefinitions>PYW_ICON;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|||
</ResourceCompile> |
|||
<Link> |
|||
<AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|||
<SubSystem>Windows</SubSystem> |
|||
</Link> |
|||
</ItemDefinitionGroup> |
|||
<ItemGroup> |
|||
<ClCompile Include="..\PC\launcher.c" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="..\PC\launcher.ico" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ResourceCompile Include="..\PC\pylauncher.rc" /> |
|||
</ItemGroup> |
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|||
<ImportGroup Label="ExtensionTargets"> |
|||
</ImportGroup> |
|||
</Project> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue