Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 0 additions & 6 deletions src/runtime/Python.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
<DefineConstants>$(DefineConstants);$(ConfiguredConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(PythonInteropFile)' != '' ">
<Compile Remove="interop*.cs" />
<Compile Include="interop.cs" />
<Compile Include="$(PythonInteropFile)" />
Comment thread
tminka marked this conversation as resolved.
</ItemGroup>

<ItemGroup>
<None Remove="resources\clr.py" />
<EmbeddedResource Include="resources\clr.py">
Expand Down
7 changes: 6 additions & 1 deletion src/runtime/native/ABI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ internal static void Initialize(Version version, BorrowedReference pyType)
thisAssembly.GetType(nativeTypeOffsetClassName, throwOnError: false)
?? thisAssembly.GetType(className, throwOnError: false);
if (typeOffsetsClass is null)
throw new NotSupportedException($"Python ABI v{version} is not supported");
{
var types = thisAssembly.GetTypes().Select(type => type.Name).Where(name => name.StartsWith("TypeOffset"));
string message = $"Searching for {className}, found {string.Join(",", types)}. " +
"If you are building Python.NET from source, make sure you have run 'python setup.py configure' to fill in configured.props";
throw new NotSupportedException($"Python ABI v{version} is not supported: {message}");
}
var typeOffsets = (ITypeOffsets)Activator.CreateInstance(typeOffsetsClass);
TypeOffset.Use(typeOffsets);

Expand Down