Skip to content

Commit

Permalink
Issue python#19962: The Windows build process now creates "python.bat"
Browse files Browse the repository at this point in the history
in the root of the source tree, which passes all arguments through
to the most recently built interpreter.
  • Loading branch information
zware committed Apr 30, 2014
1 parent b151f8f commit 45bc17b
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 1 deletion.
1 change: 1 addition & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ db_home
platform$
pyconfig.h$
python$
python.bat$
python.exe$
python-config$
python-config.py$
Expand Down
4 changes: 4 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ IDLE
Build
-----

- Issue #19962: The Windows build process now creates "python.bat" in the
root of the source tree, which passes all arguments through to the most
recently built interpreter.

- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.

Expand Down
162 changes: 161 additions & 1 deletion PCbuild/python.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Link</CustomBuildAfterTargets>
<CustomBuildAfterTargets Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Link</CustomBuildAfterTargets>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand All @@ -176,6 +184,25 @@
<StackReserveSize>2000000</StackReserveSize>
<BaseAddress>0x1d000000</BaseAddress>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
Expand All @@ -199,6 +226,25 @@
<StackReserveSize>2000000</StackReserveSize>
<BaseAddress>0x1d000000</BaseAddress>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand All @@ -221,6 +267,25 @@
<StackReserveSize>2000000</StackReserveSize>
<BaseAddress>0x1d000000</BaseAddress>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
Expand All @@ -246,6 +311,25 @@
<StackReserveSize>4194304</StackReserveSize>
<BaseAddress>0x1d000000</BaseAddress>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
<ClCompile>
Expand All @@ -268,6 +352,25 @@
<ImportLibrary>
</ImportLibrary>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
<Midl>
Expand All @@ -294,6 +397,25 @@
</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
<ClCompile>
Expand All @@ -316,6 +438,25 @@
<ImportLibrary>
</ImportLibrary>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
<Midl>
Expand All @@ -342,6 +483,25 @@
</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<CustomBuildStep>
<Command>echo @rem This script invokes the most recently built Python with all arguments&gt; "$(SolutionDir)..\python.bat"
echo @rem passed through to the interpreter. This file is generated by the&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem build process and any changes *will* be thrown away by the next&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem rebuild.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem This is only meant as a convenience for developing CPython&gt;&gt; "$(SolutionDir)..\python.bat"
echo @rem and using it outside of that context is ill-advised.&gt;&gt; "$(SolutionDir)..\python.bat"
echo @echo Running $(Configuration)^^^|$(Platform) interpreter...&gt;&gt; "$(SolutionDir)..\python.bat"
echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.bat"</Command>
</CustomBuildStep>
<CustomBuildStep>
<Message>Creating convenience batch file for easily invoking the newly built interpreter.</Message>
</CustomBuildStep>
<CustomBuildStep>
<Outputs>$(SolutionDir)..\python.bat</Outputs>
</CustomBuildStep>
<CustomBuildStep>
<Inputs>$(OutDir)python$(PyDebugExt).exe;%(Inputs)</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="..\PC\pycon.ico" />
Expand All @@ -361,4 +521,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

0 comments on commit 45bc17b

Please sign in to comment.