File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11graft src/runtime
22prune src/runtime/obj
33prune src/runtime/bin
4+ graft src/compat
45include src/pythonnet.snk
56include Directory.Build.*
67include pythonnet.sln
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ Mono (``mono``)
4545
4646.NET Framework (``netfx ``)
4747 Default on Windows and also only supported there. Must be at least version
48- 4.6.1, with 4.7.2 or later recommended.
48+ 4.6.1, with 4.7.2 or later recommended. For .NET 4.6 support, the wheel has
49+ to be built with the environment variable `PYTHONNET_BUILD_NET46_SUPPORT=1 `.
4950
5051.NET Core (``coreclr ``)
5152 Self-contained is not supported, must be at least version 3.1.
Original file line number Diff line number Diff line change @@ -124,13 +124,13 @@ def finalize_options(self):
124124 "bdist_wheel" : bdist_wheel ,
125125}
126126
127- dotnet_libs = [
128- DotnetLib (
129- "python-runtime" ,
130- "src/compat/Python.Runtime.Compat.csproj" ,
131- output = "pythonnet /runtime" ,
132- )
133- ]
127+
128+ if os . getenv ( "PYTHONNET_BUILD_NET46_SUPPORT" ):
129+ csproj = "src/compat/Python.Runtime.Compat.csproj"
130+ else :
131+ csproj = "src /runtime/Python.Runtime.csproj"
132+
133+ dotnet_libs = [ DotnetLib ( "python-runtime" , csproj , output = "pythonnet/runtime" ) ]
134134
135135setup (
136136 cmdclass = cmdclass ,
You can’t perform that action at this time.
0 commit comments