Re: Making setup.py run external command to build
Dan Stromberg <[email protected]> Mon, 14 Dec 2020 10:46:46 -0800
| Newsgroups | gmane.comp.python.distutils.devel |
|---|---|
| Message-ID | <CAGGBd_oHCbro0LSVYqS1LZZRQJ+2j3wUZ_NFGc+6V1v9RjArzg@mail.gmail.com> |
--===============6943870619346952183== Content-Type: multipart/alternative; boundary="0000000000001469e905b671110e" --0000000000001469e905b671110e Content-Type: text/plain; charset="UTF-8" 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 <[email protected]> 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 -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/distutils-sig.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/AJDJU5DYMDBPGZ75P35M5647O5VH22FL/ > --0000000000001469e905b671110e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><br></div><div>I've had some luck with this sort = of thing:<br><a href=3D"https://stromberg.dnsalias.org/svn/binary-tree-mod/= trunk/setup.py">https://stromberg.dnsalias.org/svn/binary-tree-mod/trunk/se= tup.py</a></div><div><br></div><div>It just os.system's make, and then = assumes everything is built thenceforth.</div><div><br></div></div><br><div= class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Dec 11= , 2020 at 7:10 AM Julian Smith <<a href=3D"mailto:[email protected]">jules@= op59.net</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex">Hello<br> <br> I have a project with a fairly involved build process where we generate<br> C++ via a python-clang-based code analyser, generates Python bindings<br> for the resulting C++ API with SWIG, and finally compile and link to<br> create various .so's and .py files.<br> <br> I'd like to package things up with a setup.py script, but from what i<b= r> have read, it looks like distutils expects to compile, link and run<br> swig itself, using distutils.core.setup()'s ext_modules arg?<br> <br> Is there a way to write setup.py so that it instead runs an external<br> command (e.g. 'cd foo && make all') when it is asked to bui= ld?<br> <br> Thanks for any help,<br> <br> - Jules<br> <br> -- <br> <a href=3D"http://op59.net" rel=3D"noreferrer" target=3D"_blank">http://op5= 9.net</a><br> <br> --<br> Distutils-SIG mailing list -- <a href=3D"mailto:[email protected]" t= arget=3D"_blank">[email protected]</a><br> To unsubscribe send an email to <a href=3D"mailto:distutils-sig-leave@pytho= n.org" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mail.python.org/mailman3/lists/distutils-sig.python.org/= " rel=3D"noreferrer" target=3D"_blank">https://mail.python.org/mailman3/lis= ts/distutils-sig.python.org/</a><br> Message archived at <a href=3D"https://mail.python.org/archives/list/distut= [email protected]/message/AJDJU5DYMDBPGZ75P35M5647O5VH22FL/" rel=3D"norefe= rrer" target=3D"_blank">https://mail.python.org/archives/list/distutils-sig= @python.org/message/AJDJU5DYMDBPGZ75P35M5647O5VH22FL/</a><br> </blockquote></div> --0000000000001469e905b671110e-- --===============6943870619346952183== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Distutils-SIG mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/JP6SAGJU5CGZCUQROPLH3DZJDZIG6IQH/ --===============6943870619346952183==--