black-action icon indicating copy to clipboard operation
black-action copied to clipboard

Crash on setup: "Failed building wheel for typed-ast"

Open tburrows13 opened this issue 5 years ago • 6 comments

Hello,

Starting last week, all of our black GitHub actions started failing during setup, for example: https://github.com/Zulko/moviepy/pull/1334/checks?check_run_id=1220896230

I wonder if the default Python version install in the docker file has changed - FROM python:3 - maybe it went to Python 3.9? (https://github.com/python/typed_ast/issues/146 might be relevant).

tburrows13 avatar Oct 08 '20 16:10 tburrows13

For others, I've submitted a PR to fix this here: https://github.com/lgeiger/black-action/pull/13

In the meantime, you can see my workaround here: https://github.com/cryptoadvance/specter-desktop/pull/497/files

mflaxman avatar Oct 09 '20 17:10 mflaxman

Alternatively I found that the actual Black repo psf/black has a GitHub action (even though it is not listed in the GitHub marketplace): https://github.com/Zulko/moviepy/pull/1337/files. It doesn't allow adding arguments to the black call though.

tburrows13 avatar Oct 09 '20 21:10 tburrows13

Ya, not having arguments wasn't an option for my use-case :(

mflaxman avatar Oct 09 '20 22:10 mflaxman

Let me try to make the problem clear:

black relies on typed-ast which does not have the .whl ready for Python 3.9, resulting in the need of gcc (and hence failures).

But the official black action by psf now appears to work well on Python 3.9 (see https://github.com/psf/black/issues/1747 and https://github.com/Zulko/moviepy/pull/1337/files given by @tburrows13 ). How could that be done now that its Dockerfile is almost identical to this project's? I am wondering where the magic happens?

Gowee avatar Oct 14 '20 04:10 Gowee

@mflaxman psf/black has just added support for custom arguments in https://github.com/psf/black/pull/1755

tburrows13 avatar Oct 18 '20 21:10 tburrows13

Thank you @tburrows13! I submitted a PR to this open-source project to use it: https://github.com/cryptoadvance/specter-desktop/pull/529

mflaxman avatar Oct 18 '20 22:10 mflaxman