I've had some luck with this sort of thing:
https://stromberg.dnsalias.org/svn/binary-tree-mod/trunk/setup.py

It just os.system's make, and then assumes everything is built thenceforth.


On Fri, Dec 11, 2020 at 7:10 AM Julian Smith <ju...@op59.net> wrote:

> Hello
>
> I have a project with a fairly involved build process where we generate
> C++ via a python-clang-based code analyser, generates Python bindings
> for the resulting C++ API with SWIG, and finally compile and link to
> create various .so's and .py files.
>
> I'd like to package things up with a setup.py script, but from what i
> have read, it looks like distutils expects to compile, link and run
> swig itself, using distutils.core.setup()'s ext_modules arg?
>
> Is there a way to write setup.py so that it instead runs an external
> command (e.g. 'cd foo && make all') when it is asked to build?
>
> Thanks for any help,
>
> - Jules
>
> --
> http://op59.net
>
> --
> Distutils-SIG mailing list -- distutils-sig@python.org
> To unsubscribe send an email to distutils-sig-le...@python.org
> https://mail.python.org/mailman3/lists/distutils-sig.python.org/
> Message archived at
> https://mail.python.org/archives/list/distutils-sig@python.org/message/AJDJU5DYMDBPGZ75P35M5647O5VH22FL/
>
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/archives/list/distutils-sig@python.org/message/JP6SAGJU5CGZCUQROPLH3DZJDZIG6IQH/

Reply via email to