Calling another build tool from setup.py
Asked Answered
D

0

6

I have a medium-sized C++/Python project that requires external dependencies and tools to get compiled. Namely, to interact with Qt's MOC compiler among other stuff.

This project produces a library, header files and a python extension. I'd like to leverage from python setuptools to distribute and build this project. The issue is the build bits from distutils aren't satifactory for our project needs. We need things like parallel-builds and external dependence detection.

Question: What is the best way to do this? Would it be possible, for example, to write a setup.py that delegates the build to waf? A working example (even if summarized) is a plus!

Deirdredeism answered 8/2, 2013 at 12:35 Comment(2)
waf is capable of building Qt projects too. So the magic you need is build.recurse() and for each of your projects a wscript in the project "root" folder. Unfortunately, I am not very familiar with setuptools nor with distutils.Tori
I answered a question very much related to this here: https://mcmap.net/q/1919948/-can-i-use-an-alternative-build-system-for-my-python-extension-module-written-in-cOxytetracycline

© 2022 - 2024 — McMap. All rights reserved.