gh-101522: Allow overriding Windows dependencies versions and paths using MSBuild properties (GH-101523)

This commit is contained in:
Steve Dower 2023-02-03 18:08:34 +00:00 committed by GitHub
parent 433fb3ef08
commit f6c53b80a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 30 deletions

View File

@ -0,0 +1,2 @@
Allow overriding Windows dependencies versions and paths using MSBuild
properties.

View File

@ -56,23 +56,32 @@
<!-- VPATH definition (escaped) --> <!-- VPATH definition (escaped) -->
<PyVPath Condition="$(Configuration) != 'PGInstrument'">..\\..</PyVPath> <PyVPath Condition="$(Configuration) != 'PGInstrument'">..\\..</PyVPath>
<PyVPath Condition="$(Configuration) == 'PGInstrument'">..\\..\\..</PyVPath> <PyVPath Condition="$(Configuration) == 'PGInstrument'">..\\..\\..</PyVPath>
</PropertyGroup>
<!-- Directories of external projects. tcltk is handled in tcltk.props --> <!-- Directories of external projects. tcltk is handled in tcltk.props -->
<ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir> <PropertyGroup>
<ExternalsDir Condition="$(ExternalsDir) == ''">$(EXTERNALS_DIR)</ExternalsDir>
<ExternalsDir Condition="$(ExternalsDir) == ''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir> <ExternalsDir Condition="$(ExternalsDir) == ''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir>
<ExternalsDir Condition="!HasTrailingSlash($(ExternalsDir))">$(ExternalsDir)\</ExternalsDir> <ExternalsDir Condition="!HasTrailingSlash($(ExternalsDir))">$(ExternalsDir)\</ExternalsDir>
<sqlite3Dir>$(ExternalsDir)sqlite-3.39.4.0\</sqlite3Dir> </PropertyGroup>
<bz2Dir>$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
<lzmaDir>$(ExternalsDir)xz-5.2.5\</lzmaDir>
<libffiDir>$(ExternalsDir)libffi-3.4.3\</libffiDir>
<libffiOutDir>$(ExternalsDir)libffi-3.4.3\$(ArchName)\</libffiOutDir>
<libffiIncludeDir>$(libffiOutDir)include</libffiIncludeDir>
<opensslDir>$(ExternalsDir)openssl-1.1.1s\</opensslDir>
<opensslOutDir>$(ExternalsDir)openssl-bin-1.1.1s\$(ArchName)\</opensslOutDir>
<opensslIncludeDir>$(opensslOutDir)include</opensslIncludeDir>
<nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir>$(ExternalsDir)\zlib-1.2.13\</zlibDir>
<Import Project="$(ExternalProps)" Condition="$(ExternalProps) != '' and Exists('$(ExternalProps)')" />
<PropertyGroup>
<sqlite3Dir Condition="$(sqlite3Dir) == ''">$(ExternalsDir)sqlite-3.39.4.0\</sqlite3Dir>
<bz2Dir Condition="$(bz2Dir) == ''">$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
<lzmaDir Condition="$(lzmaDir) == ''">$(ExternalsDir)xz-5.2.5\</lzmaDir>
<libffiDir Condition="$(libffiDir) == ''">$(ExternalsDir)libffi-3.4.3\</libffiDir>
<libffiOutDir Condition="$(libffiOutDir) == ''">$(libffiDir)$(ArchName)\</libffiOutDir>
<libffiIncludeDir Condition="$(libffiIncludeDir) == ''">$(libffiOutDir)include</libffiIncludeDir>
<opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-1.1.1s\</opensslDir>
<opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-1.1.1s\$(ArchName)\</opensslOutDir>
<opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.2.13\</zlibDir>
</PropertyGroup>
<PropertyGroup>
<!-- Suffix for all binaries when building for debug --> <!-- Suffix for all binaries when building for debug -->
<PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt> <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt>

View File

@ -2,22 +2,25 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="pyproject.props" Condition="$(__PyProject_Props_Imported) != 'true'" /> <Import Project="pyproject.props" Condition="$(__PyProject_Props_Imported) != 'true'" />
<PropertyGroup> <PropertyGroup>
<TclMajorVersion>8</TclMajorVersion> <TclVersion Condition="$(TclVersion) == ''">8.6.13.0</TclVersion>
<TclMinorVersion>6</TclMinorVersion> <TkVersion Condition="$(TkVersion) == ''">$(TclVersion)</TkVersion>
<TclPatchLevel>13</TclPatchLevel> <TixVersion Condition="$(TixVersion) == ''">8.4.3.6</TixVersion>
<TclRevision>0</TclRevision> <TclMajorVersion>$([System.Version]::Parse($(TclVersion)).Major)</TclMajorVersion>
<TkMajorVersion>$(TclMajorVersion)</TkMajorVersion> <TclMinorVersion>$([System.Version]::Parse($(TclVersion)).Minor)</TclMinorVersion>
<TkMinorVersion>$(TclMinorVersion)</TkMinorVersion> <TclPatchLevel>$([System.Version]::Parse($(TclVersion)).Build)</TclPatchLevel>
<TkPatchLevel>$(TclPatchLevel)</TkPatchLevel> <TclRevision>$([System.Version]::Parse($(TclVersion)).Revision)</TclRevision>
<TkRevision>$(TclRevision)</TkRevision> <TkMajorVersion>$([System.Version]::Parse($(TkVersion)).Major)</TkMajorVersion>
<TixMajorVersion>8</TixMajorVersion> <TkMinorVersion>$([System.Version]::Parse($(TkVersion)).Minor)</TkMinorVersion>
<TixMinorVersion>4</TixMinorVersion> <TkPatchLevel>$([System.Version]::Parse($(TkVersion)).Build)</TkPatchLevel>
<TixPatchLevel>3</TixPatchLevel> <TkRevision>$([System.Version]::Parse($(TkVersion)).Revision)</TkRevision>
<TixRevision>6</TixRevision> <TixMajorVersion>$([System.Version]::Parse($(TixVersion)).Major)</TixMajorVersion>
<tclDir>$(ExternalsDir)tcl-core-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\</tclDir> <TixMinorVersion>$([System.Version]::Parse($(TixVersion)).Minor)</TixMinorVersion>
<tkDir>$(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\</tkDir> <TixPatchLevel>$([System.Version]::Parse($(TixVersion)).Build)</TixPatchLevel>
<tixDir>$(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\</tixDir> <TixRevision>$([System.Version]::Parse($(TixVersion)).Revision)</TixRevision>
<tcltkDir>$(ExternalsDir)tcltk-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\$(ArchName)\</tcltkDir> <tclDir Condition="$(tclDir) == ''">$(ExternalsDir)tcl-core-$(TclVersion)\</tclDir>
<tkDir Condition="$(tkDir) == ''">$(ExternalsDir)tk-$(TkVersion)\</tkDir>
<tixDir Condition="$(tixDir) == ''">$(ExternalsDir)tix-$(TixVersion)\</tixDir>
<tcltkDir Condition="$(tcltkDir) == ''">$(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\</tcltkDir>
<tclWin32Exe Condition="$(Platform) == 'Win32'">$(tcltkDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe</tclWin32Exe> <tclWin32Exe Condition="$(Platform) == 'Win32'">$(tcltkDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe</tclWin32Exe>
<tclWin32Exe Condition="$(Platform) != 'Win32'">$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe</tclWin32Exe> <tclWin32Exe Condition="$(Platform) != 'Win32'">$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe</tclWin32Exe>