lgeiger / black-action

A GitHub action that runs black code formatter for Python
MIT License
190 stars 35 forks source link

Image build failures due to "regex" package requirement #3

Closed abn closed 5 years ago

abn commented 5 years ago

The latest release of black seems to break the image build.

Failed to build regex
Installing collected packages: regex, typed-ast, pathspec, appdirs, toml, click, attrs, black
    Running setup.py install for regex: started
    Running setup.py install for regex: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o7zo_sju/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o7zo_sju/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vvj9t9bd/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-o7zo_sju/regex/
    Complete output (22 lines):
    BASE_DIR is /tmp/pip-install-o7zo_sju/regex
    /usr/local/lib/python3.8/site-packages/setuptools/dist.py:472: UserWarning: Normalizing '2019.08.19' to '2019.8.19'
      warnings.warn(
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/regex
    copying regex_3/regex/__init__.py -> build/lib.linux-x86_64-3.8/regex
    copying regex_3/regex/regex.py -> build/lib.linux-x86_64-3.8/regex
    copying regex_3/regex/_regex_core.py -> build/lib.linux-x86_64-3.8/regex
    creating build/lib.linux-x86_64-3.8/regex/test
    copying regex_3/regex/test/__init__.py -> build/lib.linux-x86_64-3.8/regex/test
    copying regex_3/regex/test/test_regex.py -> build/lib.linux-x86_64-3.8/regex/test
    running build_ext
    building 'regex._regex' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/regex_3
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.8 -c regex_3/_regex.c -o build/temp.linux-x86_64-3.8/regex_3/_regex.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o7zo_sju/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o7zo_sju/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vvj9t9bd/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
The command '/bin/sh -c pip install black' returned a non-zero code: 1
LuckierDodge commented 5 years ago

Independently verified: #4 fixes the issue. Currently have to use @abn 's fork to make my CI work, would love to see this pull get merged.