diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2022-03-23 11:12:30 +0000 |
|---|---|---|
| committer | Daniel P. Berrangé <berrange@redhat.com> | 2022-04-21 12:34:06 +0100 |
| commit | c230ecb483dae3d0ff4cebfeec5a9e96ef8e0e4c (patch) | |
| tree | 127a8393bfd1c95d4fb3b0a0a926c5bbbb6e8df6 /libvirt-python.spec.in | |
| parent | 88067eda52c3ad38a10ef96fb064f96dea01a374 (diff) | |
| download | libvirt-python-c230ecb483dae3d0ff4cebfeec5a9e96ef8e0e4c.tar.gz | |
setup: override 'build_ext' / 'build_py' commands rather than 'build'
We override the 'build' command to invoke the code generator before the
extensions are compiled. The 'build' command, however, is merely a
wrapper around several other commands. It is possible for the user to
directly invoke those commands, in which case our code generator won't
get a chance to run:
$ python setup.py build_ext
running build_ext
building 'libvirtmod' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/build
gcc ..snip... -c build/libvirt.c -o build/temp.linux-x86_64-3.10/build/libvirt.o
cc1: fatal error: build/libvirt.c: No such file or directory
compilation terminated.
error: command '/usr/lib64/ccache/gcc' failed with exit code 1
To solve this we instead override 'build_ext' and 'build_py'. This in
turn means we call the generator to emit C code separately from Python
code.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'libvirt-python.spec.in')
0 files changed, 0 insertions, 0 deletions
