PyO3 / maturin-action

GitHub Action to install and run a custom maturin command with built-in support for cross compilation
MIT License
132 stars 37 forks source link

Support for Python 3.13 on Windows #292

Closed davidbrochart closed 1 month ago

davidbrochart commented 1 month ago

I'm trying to publish wheeld for pycrdt on Windows for Python 3.13 and I get an error suggesting that Python 3.13 is not found

🐍 Found CPython 3.8 at C:\hostedtoolcache\windows\Python\3.8.10\x64\python.exe, CPython 3.9 at C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe, CPython 3.10 at C:\hostedtoolcache\windows\Python\3.10.11\x64\python.exe, CPython 3.11 at C:\hostedtoolcache\windows\Python\3.11.9\x64\python.exe, CPython 3.12 at C:\hostedtoolcache\windows\Python\3.12.6\x64\python.exe, CPython 3.13
...
  = note: LINK : fatal error LNK1181: cannot open input file 'python313.lib'

I'm not sure I should report here, or if I'm doing something wrong on my side?

messense commented 1 month ago

Python 3.13 isn't installed by default in Actions runner yet: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#python

You can install it before building using setup-python action manually for the moment.

JacobCallahan commented 1 month ago

@messense Perhaps I'm doing something wrong, but even after setup-python explicitly adds python 3.13 for all my platforms, maturin doesn't seem to find it and stops at python 3.12. Some links for reference:

Linux x86_64: https://github.com/JacobCallahan/Hussh/actions/runs/11261961543/job/31316640293?pr=19 Run summary view: https://github.com/JacobCallahan/Hussh/actions/runs/11261961543?pr=19 PR with workflow changes: https://github.com/JacobCallahan/Hussh/pull/19

Thanks for your time!

messense commented 1 month ago

@JacobCallahan See https://github.com/PyO3/maturin/pull/2248

for now you can pass the list of python versions manually via -i, for example https://github.com/jupyter-server/pycrdt/actions/runs/11251137381/workflow#L27

JacobCallahan commented 1 month ago

@messense very nice! Do you know how soon that will be available in the action, if soon, then I might just hold off instead of doing a temporary workaround.

JacobCallahan commented 1 month ago

@messense i tried using maturin-action:main for a run to see if the change you linked would help, but it still doesn't look to have detected py3.13

https://github.com/JacobCallahan/Hussh/actions/runs/11308556582/job/31451536529?pr=19

ddelange commented 1 day ago

fyi adding setup-python doesn't fix failing CI on win i686 for 3.13: https://github.com/oconnor663/blake3-py/actions/runs/11994284643

workflow file: https://github.com/oconnor663/blake3-py/blob/0440f6dffad73a0001f0472864495b8889dd0358/.github/workflows/dists.yml