I've been working on ensconced which lets you use a SConstruct to build. It
is easier than customizing distutils.

https://github.com/dholth/pysdl2-cffi/blob/master/SConstruct is the most
code-generation-y project. Its build might be a little out of date and it
has an independent setup.py building the project with setuptools.

https://github.com/dholth/bioopenssl doesn't have C extensions but is an
example of a stub setup.py (only necessary for the develop command) and
pyproject.toml (which pip can use without a setup.py via PEP 517).

On Fri, Dec 11, 2020 at 10:09 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/FBC7LEB3WUK2XTOKYXKQMO3J7WA47SNE/

Reply via email to