Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0abfde0
Full featured xplat build.
Jul 28, 2017
8b0b399
.Net 45 TargetingPack System.XML.dll naming fix. (For xplat linux bui…
Aug 18, 2017
3f02c12
Setup.py --xplat option refactored. Travis-ci build matrix extended.
Aug 18, 2017
78d5d46
AppVeyor matrix extended, xplat build added.
Aug 19, 2017
2dc1b47
appveyor.yml yaml syntax fix.
Aug 20, 2017
665b9d7
NUnit dependency upgraded to 3.7. Changelog improved.
Aug 20, 2017
504495e
EmbeddingTest fixes, and stubs.
Aug 22, 2017
1cc9008
Fix for importing numpy and other python modules with native parts.
Aug 22, 2017
2ac981b
Build order improvement.
Aug 22, 2017
2edbc87
NetCoreApp 2.0 fix. EmitCalli does not supports cdecl. Falling-back t…
Aug 27, 2017
dac5a96
Changelog improved.
Aug 22, 2017
0852392
All finalizers are disabled until valid implementation. Helps to avoi…
Sep 4, 2017
d16100c
NetCoreApp 2.0 target added, compile issues fixed, CI system improved.
Jul 29, 2017
ed48618
Mono builds now can be build on Windows.
Sep 6, 2017
3069fe4
Python.Runtime.dll now targets NetStandard2.0 inplace of NetCoreApp 2.0
Sep 6, 2017
0ca9612
Merge
Sep 6, 2017
afaca1b
Wrong NETSTANDARD/NETCOREAPP define constant change.
Sep 6, 2017
b20d134
Typo fix.
Sep 6, 2017
966f035
PYTHONNET_PY3_VERSION, PYTHONNET_PY2_VERSION build related environmen…
Sep 7, 2017
f4a6608
Small compile fixes.
Sep 7, 2017
a89685e
PYTHONNET_WIN_DEFINE_CONSTANTS and PYTHONNET_MONO_DEFINE_CONSTANTS in…
Sep 7, 2017
153de5e
.travis.yaml file simplification.
Sep 21, 2017
447da7d
PYTHONNET_INTEROP_FILE env var introduced to allow working with custo…
Sep 21, 2017
7293223
pdb generation improved for all conditions Net 4.0/NetStandard 2.0 x …
Sep 22, 2017
0df38c2
Fix for the #539 classic build fails when VS 2017 installed.
Sep 22, 2017
52a675f
Build fixes for the fresh Windows 10 SDKS.
Nov 4, 2017
64cb7f8
Workaround: Mono downgrade to 5.2.0 to avoid broken mono 5.4.0.201
Nov 7, 2017
2ba6bff
Merge #518
Nov 16, 2017
4aa8b18
Merge #519
Nov 16, 2017
c4910f0
vswhere.exe tool now distributed with the pythonnet sources, dotnet-c…
Sep 21, 2017
700b522
backout #546, wrong merge!
Nov 16, 2017
43a9eb6
Backed #519, wrong merge!
Nov 16, 2017
1c79426
backout #518, wrong merge !
Nov 16, 2017
194e5e6
Backing out wrong merges.
Nov 16, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Python.Runtime.dll now targets NetStandard2.0 inplace of NetCoreApp 2.0
  • Loading branch information
dse committed Sep 6, 2017
commit 3069fe42d90b659da9fbb5d80a3825db2343f446
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
## [unreleased][]

### Added
- Added support for embedding python into dotnet core 2.0 (NetCoreApp2.0)
- Added support for embedding python into dotnet core 2.0 (NetStandard 2.0)
- Added new build system (pythonnet.15.sln) based on dotnetcore-sdk/xplat(crossplatform msbuild).
Currently there two side-by-side build systems that produces the same output (net40) from the same sources.
After a some transition time, current (mono/ msbuild 14.0) build system will be removed.
Expand Down
10 changes: 5 additions & 5 deletions pythonnet.15.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Runtime.15", "src\runtime\Python.Runtime.15.csproj", "{2759F4FF-716B-4828-916F-50FA86613DFC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Runtime.15", "src/runtime/Python.Runtime.15.csproj", "{2759F4FF-716B-4828-916F-50FA86613DFC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.EmbeddingTest.15", "src\embed_tests\Python.EmbeddingTest.15.csproj", "{66B8D01A-9906-452A-B09E-BF75EA76468F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.EmbeddingTest.15", "src/embed_tests/Python.EmbeddingTest.15.csproj", "{66B8D01A-9906-452A-B09E-BF75EA76468F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "clrmodule.15", "src\clrmodule\clrmodule.15.csproj", "{E08678D4-9A52-4AD5-B63D-8EBC7399981B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "clrmodule.15", "src/clrmodule/clrmodule.15.csproj", "{E08678D4-9A52-4AD5-B63D-8EBC7399981B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console.15", "src\console\Console.15.csproj", "{CDAD305F-8E72-492C-A314-64CF58D472A0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Console.15", "src/console/Console.15.csproj", "{CDAD305F-8E72-492C-A314-64CF58D472A0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Test.15", "src\testing\Python.Test.15.csproj", "{F94B547A-E97E-4500-8D53-B4D64D076E5F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Test.15", "src/testing/Python.Test.15.csproj", "{F94B547A-E97E-4500-8D53-B4D64D076E5F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,8 @@ def build_extension(self, ext):

subprocess.check_call(" ".join(cmd + ["/t:Clean"]), shell=use_shell)
subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
if DEVTOOLS == "MsDev15":
subprocess.check_call(" ".join(cmd + ["/t:Console_15:publish;Python_EmbeddingTest_15:publish", "/p:TargetFramework=netcoreapp2.0"]), shell=use_shell)
elif DEVTOOLS == "dotnet":
subprocess.check_call(" ".join(cmd + ["/t:publish", "/p:TargetFramework=netcoreapp2.0"]), shell=use_shell)

if DEVTOOLS == "MsDev15" or DEVTOOLS == "dotnet":
subprocess.check_call(" ".join(cmd + ['"/t:Console_15:publish;Python_EmbeddingTest_15:publish"', "/p:TargetFramework=netcoreapp2.0"]), shell=use_shell)
if DEVTOOLS == "Mono" or DEVTOOLS == "dotnet":
self._build_monoclr()

Expand Down
2 changes: 1 addition & 1 deletion src/embed_tests/pyimport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void SetUp()
/* Append the tests directory to sys.path
* using reflection to circumvent the private
* modifiers placed on most Runtime methods. */
#if NETCOREAPP
#if NETSTANDARD
const string s = "../../fixtures";
#else
const string s = "../fixtures";
Expand Down
11 changes: 5 additions & 6 deletions src/runtime/Python.Runtime.15.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net40;netstandard2.0</TargetFrameworks>
<Platforms>AnyCPU</Platforms>
<Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations>
<AssetTargetFallback Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">net45</AssetTargetFallback>
Expand Down Expand Up @@ -29,7 +29,7 @@
<CustomDefineConstants Condition="'$(CustomDefineConstants)' == ''">$(PYTHONNET_DEFINE_CONSTANTS)</CustomDefineConstants>
<BaseDefineConstants>XPLAT</BaseDefineConstants>
<DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(DefineConstants);NETCOREAPP</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)'=='netstandard2.0'">$(DefineConstants);NETSTANDARD</DefineConstants>
<FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride>
</PropertyGroup>

Expand Down Expand Up @@ -101,10 +101,9 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="System.Security.Permissions">
<Version>4.4.0</Version>
</PackageReference>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Security.Permissions" Version="4.4.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/nativecall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Python.Runtime
/// </summary>
internal class NativeCall
{
#if NETCOREAPP
#if NETSTANDARD
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void Void_1_Delegate(IntPtr a1);

Expand Down
9 changes: 7 additions & 2 deletions src/runtime/polyfill/ReflectionPolifills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

namespace Python.Runtime
{
#if NETSTANDARD
public static class ReflectionPolifills
{
#if NETCOREAPP
public static AssemblyBuilder DefineDynamicAssembly(this AppDomain appDomain, AssemblyName assemblyName, AssemblyBuilderAccess assemblyBuilderAccess)
{
return AssemblyBuilder.DefineDynamicAssembly(assemblyName, assemblyBuilderAccess);
}
#endif

public static Type CreateType(this TypeBuilder typeBuilder)
{
return typeBuilder.GetTypeInfo().GetType();
}
}
#endif
}
8 changes: 4 additions & 4 deletions src/runtime/runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Python.Runtime
internal static class NativeMethods
{
#if MONO_LINUX || MONO_OSX
#if NETCOREAPP
#if NETSTANDARD
private static int RTLD_NOW = 0x2;
#if MONO_LINUX
private static int RTLD_GLOBAL = 0x100;
Expand Down Expand Up @@ -181,7 +181,7 @@ public class Runtime

public static readonly string PythonDLL = _PythonDll;

#if PYTHON_WITHOUT_ENABLE_SHARED && !NETCOREAPP
#if PYTHON_WITHOUT_ENABLE_SHARED && !NETSTANDARD
internal const string _PythonDll = "__Internal";
#else
internal const string _PythonDll = dllBase + dllWithPyDebug + dllWithPyMalloc;
Expand Down Expand Up @@ -522,7 +522,7 @@ internal static Type[] PythonArgsToTypeArray(IntPtr arg, bool mangleObjects)
/// </summary>
internal static unsafe void XIncref(IntPtr op)
{
#if PYTHON_WITH_PYDEBUG || NETCOREAPP
#if PYTHON_WITH_PYDEBUG || NETSTANDARD
Py_IncRef(op);
return;
#else
Expand All @@ -543,7 +543,7 @@ internal static unsafe void XIncref(IntPtr op)

internal static unsafe void XDecref(IntPtr op)
{
#if PYTHON_WITH_PYDEBUG || NETCOREAPP
#if PYTHON_WITH_PYDEBUG || NETSTANDARD
Py_DecRef(op);
return;
#else
Expand Down
8 changes: 6 additions & 2 deletions src/testing/Python.Test.15.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net40;netstandard2.0</TargetFrameworks>
<Platforms>x64;x86</Platforms>
<Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations>
<AssemblyName>Python.Test</AssemblyName>
Expand Down Expand Up @@ -77,7 +77,11 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\runtime\Python.Runtime.15.csproj"/>
<ProjectReference Include="..\runtime\Python.Runtime.15.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand Down