-
Notifications
You must be signed in to change notification settings - Fork 752
Convert projects to SDK style #1209
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
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f811e51
Convert projects to SDK style
filmor 5607205
Drop CLSCompliant attributes to get rid of warnings
filmor fabe401
Add pyparser dependency to pyproject.toml
filmor 6f97bdd
Adjust clr loading and merge Mono code into one file
filmor ee990b7
Adjust workflows
filmor 640b497
Ignore test failing on Mono for now
filmor d75cdcc
Always run configure step if dotnet modules are present
filmor 6cb3fd9
Add solution items back
filmor deaf97b
Remove outdated comment
filmor 916b26a
Run AppVeyor tests without coverage for now
filmor 3ae7026
Split build_dotnet into its own command
filmor e3f8c20
Do the clr import later to not interfere with other test imports
filmor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<VersionPrefix>3.0.0</VersionPrefix> | ||
<AssemblyCopyright>Copyright (c) 2006-2020 The Contributors of the Python.NET Project</AssemblyCopyright> | ||
<AssemblyCompany>pythonnet</AssemblyCompany> | ||
<AssemblyProduct>Python.NET</AssemblyProduct> | ||
<LangVersion>7.3</LangVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageReference Include="NonCopyableAnalyzer" Version="0.6.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildThisFileDirectory)configured.props" Condition="Exists('$(MSBuildThisFileDirectory)configured.props')" /> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
""" | ||
Legacy Python.NET loader for backwards compatibility | ||
""" | ||
|
||
def _get_netfx_path(): | ||
import os, sys | ||
|
||
if sys.maxsize > 2 ** 32: | ||
arch = "amd64" | ||
else: | ||
arch = "x86" | ||
|
||
return os.path.join(os.path.dirname(__file__), "pythonnet", "netfx", arch, "clr.pyd") | ||
|
||
|
||
def _get_mono_path(): | ||
import os, glob | ||
|
||
paths = glob.glob(os.path.join(os.path.dirname(__file__), "pythonnet", "mono", "clr.*so")) | ||
return paths[0] | ||
|
||
|
||
def _load_clr(): | ||
import sys | ||
from importlib import util | ||
|
||
if sys.platform == "win32": | ||
path = _get_netfx_path() | ||
else: | ||
path = _get_mono_path() | ||
|
||
del sys.modules[__name__] | ||
|
||
spec = util.spec_from_file_location("clr", path) | ||
clr = util.module_from_spec(spec) | ||
spec.loader.exec_module(clr) | ||
|
||
sys.modules[__name__] = clr | ||
|
||
|
||
_load_clr() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "pycparser"] | ||
build-backend = "setuptools.build_meta" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.