You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to track down a bug in my code by breaking into pythonnet in Visual Studio. This necessitated a debug build. The setup.py appears to provide this option in the build_dotnet step through the --dotnet-config option. Unfortunately, this option is broken as currently implemented.
$ python setup.py build_dotnet --dotnet-config=debug
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --dotnet-config must not have an argument
If there was a crash, please include the traceback here.
See above.
Solution
I was able to fix this by modifying setup.py:24-36 to
classbuild_dotnet(Command):
"""Build command for dotnet-cli based builds"""description="Build DLLs with dotnet-cli"user_options= [
("dotnet-config=", None, "dotnet build configuration"),
(
"inplace",
"i",
"ignore build-lib and put compiled extensions into the source "+"directory alongside your pure Python modules",
),
]
The key is the = sign after the dotnet-config option.
With this change, the debug build proceeded correctly.
Environment
Details
I was trying to track down a bug in my code by breaking into pythonnet in Visual Studio. This necessitated a debug build. The setup.py appears to provide this option in the build_dotnet step through the --dotnet-config option. Unfortunately, this option is broken as currently implemented.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
See above.
I was able to fix this by modifying setup.py:24-36 to
The key is the = sign after the dotnet-config option.
With this change, the debug build proceeded correctly.
The text was updated successfully, but these errors were encountered: