Skip to content

Can't build with .NET Framework 4.6.1 support on Windows x86-64 #2715

@Metadorius

Description

@Metadorius

followup on #2701: after @filmor's changes to ship .NET Framework 4.6.1 only on Windows, I am now getting this when trying to build:

      Built pythonnet @ git+https://github.com/pythonnet/pythonnet@023838701dae2a24a5c39e4594eb76c7cd8ba365
  × Failed to download and build `pythonnet @
  │ git+https://github.com/pythonnet/pythonnet@023838701dae2a24a5c39e4594eb76c7cd8ba365`
  ╰─▶ The built wheel `pythonnet-3.1.0rc0-py3-none-win32.whl` is not compatible with the current Python 3.13 on
      windows x86_64

Relevant parts of pyproject.toml:

[project]
requires-python = ">= 3.13"
dependencies = [
    "clr-loader; sys_platform == 'win32'",
    "pythonnet; sys_platform == 'win32'",
]

[tool.uv]
# TODO: remove this once pythonnet/clr-loader are switched back to wheels, or caching is set up properly for the packages
reinstall-package = ["clr-loader", "pythonnet"]
# net46-support build flag required for pythonnet's .NET 4.6.1 target (mirrors: uv build --wheel -C="--global-option=--net46-support")
config-settings-package = {pythonnet = {"--global-option" = "--net46-support"}}

[tool.uv.sources]
# TODO: remove those two from [tool.uv] when switched back to wheels
pythonnet = { git = "https://github.com/pythonnet/pythonnet", rev = "023838701dae2a24a5c39e4594eb76c7cd8ba365" }
clr-loader = { git = "https://github.com/pythonnet/clr-loader", rev = "b9497f6bf2544ae103caae3b8d4a8786c53ba4e4" }

I am on Windows x86-64. I wasn't getting this issue when the support was added unconditionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions