Skip to content
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

Config-less CoreCLR and improved runtime load message #1942

Merged
merged 3 commits into from
Sep 17, 2022

Conversation

filmor
Copy link
Member

@filmor filmor commented Sep 16, 2022

What does this implement/fix? Explain your changes.

  • Bump clr-loader dependency to 0.2.0 and adjust interface, allows to load a .NET Core Python.NET by just setting PYTHONNET_RUNTIME=coreclr or from pythonnet import set_runtime; set_runtime("coreclr")
  • Improve error message if the runtime fails to load

Does this close any currently open issues?

#1868

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Ensure you have signed the .NET Foundation CLA
  • Add yourself to AUTHORS
  • Updated the CHANGELOG

@filmor filmor changed the base branch from master to release September 16, 2022 19:35
@filmor filmor closed this Sep 16, 2022
@filmor filmor reopened this Sep 16, 2022
@filmor
Copy link
Member Author

filmor commented Sep 16, 2022

@lostmsu Do you have any idea why this one doesn't run the CI?

/edit: Sure, now it does :)

@lostmsu
Copy link
Member

lostmsu commented Sep 16, 2022

Can you point to the corresponding change in clr_loader?

@lostmsu
Copy link
Member

lostmsu commented Sep 16, 2022

I take it it is this one: pythonnet/clr-loader#31

@filmor filmor force-pushed the configless-coreclr branch 2 times, most recently from 25db74b to cc81b31 Compare September 16, 2022 21:49
@filmor
Copy link
Member Author

filmor commented Sep 16, 2022

Meh, I'll have to test it tomorrow on a Windows machine, not really sure what I broke there (and why it works for the clr-loader CI).

@lostmsu
Copy link
Member

lostmsu commented Sep 16, 2022

Have you seen the cause of the exception?

OSError: cannot load library 'c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages\clr_loader\ffi\dlls\amd64\ClrLoader.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages\clr_loader\ffi\dlls\amd64\ClrLoader.dll'

The above exception was the direct cause of the following exception:
...

@filmor
Copy link
Member Author

filmor commented Sep 16, 2022

Have you seen the cause of the exception?

OSError: cannot load library 'c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages\clr_loader\ffi\dlls\amd64\ClrLoader.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages\clr_loader\ffi\dlls\amd64\ClrLoader.dll'
The above exception was the direct cause of the following exception:
...

Nope, didn't see that one. Then I must have broken the wheel building somehow. I can see that the wheel does not include the file at all right now. So, 0.2.3 it will be ;)

- Supports loading without explicitly specifying the runtime config now
- Exposes information on the loaded runtime
@filmor filmor merged commit 43769f5 into pythonnet:release Sep 17, 2022
@filmor filmor deleted the configless-coreclr branch September 17, 2022 08:52
@DareDevilDenis
Copy link

Hello. Does this change cause the following issue: pythonnet/clr-loader#35
See question: #1951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants