Skip to content

Build single Python.Runtime.dll for all platforms #1365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
909ed1f
dropped net40 target from modern projects
lostmsu Nov 30, 2020
47e926e
use .NET Standard 2.0 platform detection features
lostmsu Dec 2, 2020
21683b3
drop NativeCodePage alltogether
lostmsu Dec 2, 2020
972c41d
WIP: use C# 9 function pointers for PInvoke
lostmsu Dec 4, 2020
51e5184
allow setting PythonDLL
lostmsu Dec 10, 2020
2498d47
always explicitly specify the way strings are marshaled
lostmsu Jan 22, 2021
70fc803
CI: figure out DLL name from environment
lostmsu Jan 22, 2021
28a5dab
use Roslyn preview in CI
lostmsu Jan 22, 2021
c75229a
fixed Linux and Mac DLL loaders breaking dll path
lostmsu Jan 22, 2021
a0a1dc1
correctly detect DLL on *nix when running from Python
lostmsu Jan 22, 2021
1b88783
Windows library loader: add support for hModule == 0
lostmsu Jan 22, 2021
2c1aaef
fix dll loading in tests
lostmsu Jan 22, 2021
39e41d0
mentiond PythonDLL in changelog
lostmsu Jan 22, 2021
17040fe
set PYDLL in AppVeyor
lostmsu Jan 22, 2021
b7410b6
revert automatically added 'm' suffix for *nix default dll name
lostmsu Jan 22, 2021
275cae9
specify full DLL name instead of PYVER in GH Actions
lostmsu Jan 22, 2021
b4cb37e
use Microsoft.Net.Compilers.Toolset instead of Microsoft.Net.Compilers
lostmsu Jan 23, 2021
f68e581
in CI MacOS python DLL has 'm' suffix
lostmsu Jan 23, 2021
cda604a
only set PYTHONNET_PYDLL for test runs from .NET
lostmsu Jan 23, 2021
3982892
workaround for pytest/clr module not preloading python C API library
lostmsu Jan 23, 2021
a6cbe20
addressed a few code comments
lostmsu Jan 26, 2021
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
Next Next commit
dropped net40 target from modern projects
  • Loading branch information
lostmsu committed Jan 28, 2021
commit 909ed1f7a53e151913d993e53bf6a454030d2f12
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ when .NET expects an integer [#1342][i1342]
### Removed

- implicit assembly loading (you have to explicitly `clr.AddReference` before doing import)
- support for .NET Framework 4.0-4.6; Mono before 5.4. Python.NET now requires .NET Standard 2.0
(see [the matrix](https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support))

## [2.5.0][] - 2020-06-14

Expand Down
2 changes: 1 addition & 1 deletion src/console/pythonconsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private PythonConsole()
[STAThread]
public static int Main(string[] args)
{
// Only net40 is capable to safely inject python.runtime.dll into resources.
// Only .NET Framework is capable to safely inject python.runtime.dll into resources.
#if NET40
// reference the static assemblyLoader to stop it being optimized away
AssemblyLoader a = assemblyLoader;
Expand Down
10 changes: 2 additions & 8 deletions src/tests/tests.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@
<InterpreterId />
<InterpreterVersion />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'DebugMono'" />
<PropertyGroup Condition="'$(Configuration)' == 'DebugWin'" />
<PropertyGroup Condition="'$(Configuration)' == 'ReleaseMono'" />
<PropertyGroup Condition="'$(Configuration)' == 'ReleaseWin'" />
<PropertyGroup Condition="'$(Configuration)' == 'DebugMonoPY3'" />
<PropertyGroup Condition="'$(Configuration)' == 'DebugWinPY3'" />
<PropertyGroup Condition="'$(Configuration)' == 'ReleaseMonoPY3'" />
<PropertyGroup Condition="'$(Configuration)' == 'ReleaseWinPY3'" />
<PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
<PropertyGroup Condition="'$(Configuration)' == 'Release'" />
<PropertyGroup>
<VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
<PtvsTargetsFile>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets</PtvsTargetsFile>
Expand Down