• Kirill Smelkov's avatar
    Fix build_dso on clean checkout · ad6305c0
    Kirill Smelkov authored
    Similarly to build_ext we need ccan/config.h to be present for dso to
    build. It was not the case and so pip install wendelin.core was failing:
    
        $ pip install wendelin.core-2.0a2.tar.gz
        Processing ./wendelin.core-2.0a2.tar.gz
          Installing build dependencies ... done
          Getting requirements to build wheel ... done
            Preparing wheel metadata ... done
        Collecting ZODB>=4
        ...
        Building wheels for collected packages: wendelin.core
          Building wheel for wendelin.core (PEP 517) ... error
          ERROR: Command errored out with exit status 1:
          ...
          running build_dso
          Building DSOs
          building 'wendelin.bigfile.libvirtmem' DSO as build/lib.linux-x86_64-2.7/wendelin/bigfile/liblibvirtmem.so
          creating build/temp.linux-x86_64-2.7
          creating build/temp.linux-x86_64-2.7/bigfile
          creating build/temp.linux-x86_64-2.7/lib
          x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-vgIf7a/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -D_GNU_SOURCE -I/tmp/pip-build-env-lfVr7E/overlay/lib/python2.7/site-packages -I. -I./include -I./3rdparty/ccan -I./3rdparty/include -Ibuild/lib.linux-x86_64-2.7/. -c bigfile/pagefault.c -o build/temp.linux-x86_64-2.7/bigfile/pagefault.o -fno-strict-aliasing -std=gnu99 -fplan9-extensions -Wno-declaration-after-statement -Wno-error=declaration-after-statement
          In file included from ./include/wendelin/list.h:11,
                           from ./include/wendelin/bigfile/virtmem.h:50,
                           from bigfile/pagefault.c:29:
          ./3rdparty/ccan/ccan/array_size/array_size.h:4:10: fatal error: config.h: Нет такого файла или каталога
              4 | #include "config.h"
                |          ^~~~~~~~~~
          compilation terminated.
          error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
          ----------------------------------------
          ERROR: Failed building wheel for wendelin.core
        Failed to build wendelin.core
        ERROR: Could not build wheels for wendelin.core which use PEP 517 and cannot be installed directly
    
    -> Fix it by making build_dso also first come through `make all`.
    
    NOTE we cannot fix it in exactly the same way as for build_ext: if we split
    build_dso into build_dso and ll_build_dso, `make all` will still go to infinite
    recursion: build_dso -> ll_build_dso -> build_dso (not ll_build_dso, this is controlled by setuptools_dso) -> oops.
    ad6305c0
setup.py 15.7 KB