PythonNet installation does not require copy pasting
- Requires a new PythonNet 1.0.5.15 package where the different `.dll` are in a specific folder: `\win` `\linux` and `\osx` - Removed not present `decimal.py` from `Algorithm.Python` project. It was moved into `Common`. - Replace `xbuild` for `msbuild` required for using the `System.Runtime.InteropServices`. Also note the `xbuild` on travis prints: > >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
<Content Include="BasicTemplateFuturesFrameworkAlgorithm.py" />
|
||||
<Content Include="BasicTemplateOptionsFrameworkAlgorithm.py" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="decimal.py" />
|
||||
<None Include="CompositeRiskManagementModelFrameworkAlgorithm.py" />
|
||||
<None Include="BlackLittermanPortfolioOptimizationFrameworkAlgorithm.py" />
|
||||
<None Include="packages.config" />
|
||||
@@ -178,12 +177,43 @@
|
||||
<ItemGroup>
|
||||
<None Include="OptionDataNullReferenceRegressionAlgorithm.py" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Python.Runtime, Version=1.0.5.14, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\QuantConnect.pythonnet.1.0.5.14\lib\Python.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<IsWindows>false</IsWindows>
|
||||
<IsWindows Condition="'$(OS)' == 'Windows_NT'">true</IsWindows>
|
||||
<IsOSX>false</IsOSX>
|
||||
<IsOSX Condition="'$(IsWindows)' != 'true' AND '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
|
||||
<IsLinux>false</IsLinux>
|
||||
<IsLinux Condition="'$(IsWindows)' != 'true' AND '$(IsOSX)' != 'true' AND '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
|
||||
</PropertyGroup>
|
||||
<Target Name="PrintRID" BeforeTargets="Build">
|
||||
<Message Text="IsWindows $(IsWindows)" Importance="high" />
|
||||
<Message Text="IsOSX $(IsOSX)" Importance="high" />
|
||||
<Message Text="IsLinux $(IsLinux)" Importance="high" />
|
||||
<Message Text="ForceLinuxBuild $(ForceLinuxBuild)" Importance="high" />
|
||||
</Target>
|
||||
<Choose>
|
||||
<When Condition="$(IsWindows) AND '$(ForceLinuxBuild)' != 'true'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Python.Runtime, Version=1.0.5.15, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\QuantConnect.pythonnet.1.0.5.15\lib\win\Python.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(IsLinux) OR '$(ForceLinuxBuild)' == 'true'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Python.Runtime, Version=1.0.5.15, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\QuantConnect.pythonnet.1.0.5.15\lib\linux\Python.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(IsOSX) AND '$(ForceLinuxBuild)' != 'true'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Python.Runtime, Version=1.0.5.15, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\QuantConnect.pythonnet.1.0.5.15\lib\osx\Python.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent Condition="'$(OS)' == 'Windows_NT' ">
|
||||
@@ -193,12 +223,12 @@
|
||||
./build.sh
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\QuantConnect.pythonnet.1.0.5.14\build\QuantConnect.pythonnet.targets" Condition="Exists('..\packages\QuantConnect.pythonnet.1.0.5.14\build\QuantConnect.pythonnet.targets')" />
|
||||
<Import Project="..\packages\QuantConnect.pythonnet.1.0.5.15\build\QuantConnect.pythonnet.targets" Condition="Exists('..\packages\QuantConnect.pythonnet.1.0.5.15\build\QuantConnect.pythonnet.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\QuantConnect.pythonnet.1.0.5.14\build\QuantConnect.pythonnet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\QuantConnect.pythonnet.1.0.5.14\build\QuantConnect.pythonnet.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\QuantConnect.pythonnet.1.0.5.15\build\QuantConnect.pythonnet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\QuantConnect.pythonnet.1.0.5.15\build\QuantConnect.pythonnet.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
Reference in New Issue
Block a user