ironpython3
ironpython3 copied to clipboard
Initial creation of the IronPython SDK
This is an initial start at creating IronPython.Sdk, which allows you to enjoy the beautiful SDK-style project feature that modern .NET uses.
This SDK is also compatible with non-IronPython projects.
For example
An IronPython project should probably look like:
<Project Sdk="IronPython.Sdk" ToolsVersion="4.0">
<PropertyGroup>
<!-- Below is the default, but you can also specify "CPython" -->
<PythonInterpreter>IronPython</PythonInterpreter>
<PythonVersion>3.4</PythonVersion>
</PropertyGroup>
</Project>
Tell me this isn't awesome 😁
Is it intended to work on macOS/Linux too? If it supports the debugger in VSCode it will be awesome! I have noticed many people were struggling with IronPython debugging.
On a more practical side, how about placing the SDK in src/tooling/IronPython.Sdk (i.e. rename sdk to tooling). In this way the directory can logically contain other, non-SDK tooling. For example, I am working (well, was working) on IPython/Jupyter support. So far it works without significant workarounds, but the version for Python 3.4 is no longer supported, so it is conceivable that some dedicated fork for IronPython will be needed. Another project idea is scaffolding for pylint or another linter) that understands CLR and .NET namespaces.
I know some Visual Studio engineers as well and I've been wondering about creating a Visual Studio/VS Code extension for using IronPython easily.
In VS Code the experience should be the same as with Python, and interacting with IronPython projects should be kept minimal - perhaps via a CLI to make it easiest
And yes, SDK style projects are supported by the dotnet.exe command, meaning that they can build on macOS/Linux in theory.
Another project idea is scaffolding for
pylintor another linter) that understands CLR and .NET namespaces.
Unless I remember wrong, PTVS included this as well.
Neat. I guess this is meant to be a replacement for the PTVS pyproj? The pyproj support in Visual Studio isn't too bad (though it's using the old ugly non-SDK style projects). Although no debugging for IronPython. 🤷
For my personal use case being able to easily pick interpreters/environments is important. PTVS does something like this to define interpreters:
<ItemGroup>
<InterpreterReference Include="Global|IronPython|3.4" />
<InterpreterReference Include="Global|PythonCore|3.9" />
</ItemGroup>
<ItemGroup>
<Interpreter Include="env\">
<Id>env</Id>
<Version>3.4</Version>
<Description>env (IronPython 3.4 (64-bit))</Description>
<InterpreterPath>Scripts\ipy.exe</InterpreterPath>
<WindowsInterpreterPath>Scripts\ipy.exe</WindowsInterpreterPath>
<PathEnvironmentVariable>IRONPYTHONPATH</PathEnvironmentVariable>
<Architecture>X64</Architecture>
</Interpreter>
</ItemGroup>
Not saying it's the best thing to do... I like auto-detect that VSCode does to detect interpreters (although it doesn't handle IronPython very well).
The project extension will still be pyproj (I think this will work, there's no actual way of knowing until the SDK gets published)
This will be ready soon, no idea why the CI is suddenly failing. I want to split this into multiple PRs. I'm also interested in adding support for the built-in Visual Studio "Build" and "Rebuild" commands using ipyc.
I also want to add proper support for PackageReference.
Question: will there a plan to continue ironclad3?
Update your main to the new main tip from the IronPython repo, then rebase your branch (starting from commit a5b0c4f) onto the new main tip. The rebase should proceed without conflicts.
Yep, just strange that it happened.
It's because I force-pushed the main branch, apologies. You will need to force-push your rebased branch too.
@slozier this PR is ready for review
@slozier?
@slozier?
Sorry, I just need to find more than 5 minutes to sit down and properly try it out.
The SDK seems not supports compiler. Maybe we need a MSBuild Task pyc to support it. https://github.com/wherewhere/MSBuild.Sdk.Extras/blob/main/Source/MSBuild.Sdk.Extras.PY/targets/MSBuild.Sdk.Extras.PY.targets