|
| 1 | +<Project> |
| 2 | + <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> |
| 3 | + <PropertyGroup> |
| 4 | + <TargetFrameworks>net40;netstandard2.0</TargetFrameworks> |
| 5 | + <Platforms>AnyCPU</Platforms> |
| 6 | + <Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations> |
| 7 | + <AssetTargetFallback Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">net45</AssetTargetFallback> |
| 8 | + <RootNamespace>Python.Runtime</RootNamespace> |
| 9 | + <AssemblyName>Python.Runtime</AssemblyName> |
| 10 | + <PackageId>pythonnet</PackageId> |
| 11 | + <VersionPrefix>2.4.1</VersionPrefix> |
| 12 | + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
| 13 | + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> |
| 14 | + <Title>Python for .NET</Title> |
| 15 | + <Copyright>Copyright (c) 2006-2019 the contributors of the 'Python for .NET' project</Copyright> |
| 16 | + <Description>Python and CLR (.NET and Mono) cross-platform language interop</Description> |
| 17 | + <Authors>pythonnet</Authors> |
| 18 | + <PackageLicenseUrl>https://github.com/pythonnet/pythonnet/blob/master/LICENSE</PackageLicenseUrl> |
| 19 | + <RepositoryUrl>https://github.com/pythonnet/pythonnet</RepositoryUrl> |
| 20 | + <RepositoryType>git</RepositoryType> |
| 21 | + <!--<PackageReleaseNotes>https://github.com/pythonnet/pythonnet/releases/tag/v2.4.0</PackageReleaseNotes>--> |
| 22 | + <PackageTags>python interop dynamic dlr Mono pinvoke</PackageTags> |
| 23 | + <PackageIconUrl>https://raw.githubusercontent.com/pythonnet/pythonnet/master/src/console/python-clear.ico</PackageIconUrl> |
| 24 | + <PackageProjectUrl>https://pythonnet.github.io/</PackageProjectUrl> |
| 25 | + <OutputPath>bin\</OutputPath> |
| 26 | + <AppendTargetFrameworkToOutputPath Condition="'$(TargetFramework)'=='net40'">false</AppendTargetFrameworkToOutputPath> |
| 27 | + <DocumentationFile Condition="'$(TargetFramework)'=='net40'">$(OutputPath)\$(AssemblyName).xml</DocumentationFile> |
| 28 | + <DocumentationFile Condition="'$(TargetFramework)'!='net40'">$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> |
| 29 | + <NoWarn>1591;NU1701</NoWarn> |
| 30 | + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> |
| 31 | + <PythonBuildDir Condition="'$(PythonBuildDir)' == ''">$(SolutionDir)\bin\</PythonBuildDir> |
| 32 | + <PublishDir Condition="'$(TargetFramework)'!='net40'">$(PythonBuildDir)\$(TargetFramework)\</PublishDir> |
| 33 | + <LangVersion>6</LangVersion> |
| 34 | + <AllowUnsafeBlocks>True</AllowUnsafeBlocks> |
| 35 | + <AssemblyOriginatorKeyFile>..\pythonnet.snk</AssemblyOriginatorKeyFile> |
| 36 | + <CustomDefineConstants Condition="'$(CustomDefineConstants)' == ''">$(PYTHONNET_DEFINE_CONSTANTS)</CustomDefineConstants> |
| 37 | + <BaseDefineConstants>XPLAT</BaseDefineConstants> |
| 38 | + <DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants> |
| 39 | + <DefineConstants Condition="'$(TargetFramework)'=='netstandard2.0'">$(DefineConstants);NETSTANDARD</DefineConstants> |
| 40 | + <DefineConstants Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(CustomDefineConstants)' != '' AND $(Configuration.Contains('Debug'))">$(DefineConstants);TRACE;DEBUG</DefineConstants> |
| 41 | + <FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride> |
| 42 | + <Python2Version>$(PYTHONNET_PY2_VERSION)</Python2Version> |
| 43 | + <Python2Version Condition="'$(Python2Version)'==''">PYTHON27</Python2Version> |
| 44 | + <Python3Version>$(PYTHONNET_PY3_VERSION)</Python3Version> |
| 45 | + <Python3Version Condition="'$(Python3Version)'==''">PYTHON37</Python3Version> |
| 46 | + <PythonWinDefineConstants>$(PYTHONNET_WIN_DEFINE_CONSTANTS)</PythonWinDefineConstants> |
| 47 | + <PythonWinDefineConstants Condition="'$(PythonWinDefineConstants)'==''">UCS2</PythonWinDefineConstants> |
| 48 | + <PythonMonoDefineConstants>$(PYTHONNET_MONO_DEFINE_CONSTANTS)</PythonMonoDefineConstants> |
| 49 | + <PythonMonoDefineConstants Condition="'$(PythonMonoDefineConstants)'==''">UCS4;MONO_LINUX;PYTHON_WITH_PYMALLOC</PythonMonoDefineConstants> |
| 50 | + <PythonInteropFile Condition="'$(PythonInteropFile)'==''">$(PYTHONNET_INTEROP_FILE)</PythonInteropFile> |
| 51 | + </PropertyGroup> |
| 52 | + <PropertyGroup Condition="$(Configuration.Contains('Debug')) AND '$(TargetFramework)'=='net40'"> |
| 53 | + <Optimize>false</Optimize> |
| 54 | + <DebugType>full</DebugType> |
| 55 | + </PropertyGroup> |
| 56 | + <PropertyGroup Condition="$(Configuration.Contains('Release')) AND '$(TargetFramework)'=='net40'"> |
| 57 | + <Optimize>true</Optimize> |
| 58 | + <DebugType>pdbonly</DebugType> |
| 59 | + </PropertyGroup> |
| 60 | + <PropertyGroup Condition="$(Configuration.Contains('Debug')) AND '$(TargetFramework)'=='netstandard2.0'"> |
| 61 | + <DebugSymbols>true</DebugSymbols> |
| 62 | + <Optimize>false</Optimize> |
| 63 | + <DebugType>full</DebugType> |
| 64 | + </PropertyGroup> |
| 65 | + <PropertyGroup Condition="$(Configuration.Contains('Release')) AND '$(TargetFramework)'=='netstandard2.0'"> |
| 66 | + <DebugSymbols>true</DebugSymbols> |
| 67 | + <Optimize>true</Optimize> |
| 68 | + <DebugType>portable</DebugType> |
| 69 | + </PropertyGroup> |
| 70 | + |
| 71 | + <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMono'"> |
| 72 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;$(Python2Version);$(PythonMonoDefineConstants)</DefineConstants> |
| 73 | + </PropertyGroup> |
| 74 | + <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMonoPY3'"> |
| 75 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;$(Python3Version);$(PythonMonoDefineConstants)</DefineConstants> |
| 76 | + </PropertyGroup> |
| 77 | + <PropertyGroup Condition=" '$(Configuration)' == 'DebugMono'"> |
| 78 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;$(Python2Version);$(PythonMonoDefineConstants);FINALIZER_CHECK;TRACE;DEBUG</DefineConstants> |
| 79 | + </PropertyGroup> |
| 80 | + <PropertyGroup Condition=" '$(Configuration)' == 'DebugMonoPY3'"> |
| 81 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;$(Python3Version);$(PythonMonoDefineConstants);FINALIZER_CHECK;TRACE;DEBUG</DefineConstants> |
| 82 | + </PropertyGroup> |
| 83 | + <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWin'"> |
| 84 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;$(Python2Version);$(PythonWinDefineConstants)</DefineConstants> |
| 85 | + </PropertyGroup> |
| 86 | + <PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWinPY3'"> |
| 87 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;$(Python3Version);$(PythonWinDefineConstants)</DefineConstants> |
| 88 | + </PropertyGroup> |
| 89 | + <PropertyGroup Condition=" '$(Configuration)' == 'DebugWin'"> |
| 90 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;$(Python2Version);$(PythonWinDefineConstants);FINALIZER_CHECK;TRACE;DEBUG</DefineConstants> |
| 91 | + </PropertyGroup> |
| 92 | + <PropertyGroup Condition=" '$(Configuration)' == 'DebugWinPY3'"> |
| 93 | + <DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;$(Python3Version);$(PythonWinDefineConstants);FINALIZER_CHECK;TRACE;DEBUG</DefineConstants> |
| 94 | + </PropertyGroup> |
| 95 | + |
| 96 | + <ItemGroup Condition=" '$(PythonInteropFile)' != '' "> |
| 97 | + <Compile Remove="interop*.cs" /> |
| 98 | + <Compile Include="interop.cs" /> |
| 99 | + <Compile Include="$(PythonInteropFile)" /> |
| 100 | + </ItemGroup> |
| 101 | + |
| 102 | + <ItemGroup> |
| 103 | + <None Include="..\pythonnet.snk" /> |
| 104 | + </ItemGroup> |
| 105 | + <ItemGroup> |
| 106 | + <None Remove="resources\clr.py" /> |
| 107 | + </ItemGroup> |
| 108 | + |
| 109 | + <ItemGroup> |
| 110 | + <Compile Include="..\SharedAssemblyInfo.cs" Link="Properties\SharedAssemblyInfo.cs" /> |
| 111 | + </ItemGroup> |
| 112 | + |
| 113 | + <ItemGroup> |
| 114 | + <EmbeddedResource Include="resources\clr.py"> |
| 115 | + <LogicalName>clr.py</LogicalName> |
| 116 | + </EmbeddedResource> |
| 117 | + </ItemGroup> |
| 118 | + |
| 119 | + <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> |
| 120 | + <PackageReference Include="System.Security.Permissions" Version="4.4.0" /> |
| 121 | + <PackageReference Include="System.Reflection.Emit" Version="4.3.0" /> |
| 122 | + </ItemGroup> |
| 123 | + |
| 124 | + <ItemGroup Condition="'$(TargetFramework)' == 'net40'"> |
| 125 | + <Reference Include="Microsoft.CSharp" /> |
| 126 | + </ItemGroup> |
| 127 | + |
| 128 | + <ItemGroup Condition="'$(TargetFramework)'=='net40'"> |
| 129 | + <PackageReference Include="Microsoft.TargetingPack.NETFramework.v4.5" Version="1.0.1" ExcludeAssets="All" PrivateAssets="All" /> |
| 130 | + </ItemGroup> |
| 131 | + |
| 132 | + <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> |
| 133 | + |
| 134 | + <PropertyGroup> |
| 135 | + <TargetAssembly>$(TargetPath)</TargetAssembly> |
| 136 | + <TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb> |
| 137 | + </PropertyGroup> |
| 138 | + |
| 139 | + <Target Name="BeforeBuild" Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono')) AND '$(OS)' != 'Windows_NT'"> |
| 140 | + <!--Endless war!--> |
| 141 | + <Exec Command="[[ -e $(NuGetPackageRoot)/microsoft.targetingpack.netframework.v4.5/1.0.1/lib/net45/System.Xml.dll ]] || cp $(NuGetPackageRoot)/microsoft.targetingpack.netframework.v4.5/1.0.1/lib/net45/System.XML.dll $(NuGetPackageRoot)/microsoft.targetingpack.netframework.v4.5/1.0.1/lib/net45/System.Xml.dll" /> |
| 142 | + </Target> |
| 143 | + <Target Name="AfterBuild"> |
| 144 | + <Copy Condition="'$(TargetFramework)'=='net40'" SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
| 145 | + <!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /--> |
| 146 | + </Target> |
| 147 | +</Project> |
0 commit comments