Skip to content
  • Thomas Haller's avatar
    build: drop "check-python-black" check from autotools · 12299ee9
    Thomas Haller authored
    Previously, autotools would detect whether we have "black"
    in the path. And if so, it would check formatting during `make check`.
    
    That's problematic. When I run `./contrib/fedora/rpm/build_clean.sh -w test`
    in certain cases, it would pick up black, but then fail with
    
      Traceback (most recent call last):
        File "/usr/bin/black", line 5, in <module>
          from black import patched_main
        File "/usr/lib/python3.6/site-packages/black.py", line 42, in <module>
          from attr import dataclass, evolve, Factory
      ModuleNotFoundError: No module named 'attr'
      make[3]: *** [Makefile:21658: check-python-black] Error 1
    
    That's an installation error of black, but still, during package build
    there is no need to check the formatting. We could export
    `NMTST_SKIP_PYTHON_BLACK=1` to prevent it, but it's still unnecessary.
    
    We check proper formatting in gitlab-ci. That is enough, it doesn't
    need to run during `make check`. In particular, because `black .`
    takes 1.5 seconds on my machine.
    12299ee9