Re: Making setup.py run external command to build

Daniel Holth <[email protected]> Mon, 14 Dec 2020 13:29:28 -0500
Newsgroups gmane.comp.python.distutils.devel
Message-ID <CAG8k2+7m+kgRR5dK4WkWGNc_pLqPOooQ8DxteiiyC2wk_9TL8g@mail.gmail.com>
--===============6686283861879125906==
Content-Type: multipart/alternative; boundary="0000000000003411da05b670d3c6"

--0000000000003411da05b670d3c6
Content-Type: text/plain; charset="UTF-8"

You would have to have a high tolerance for learning SCons. I'm aware that
this is not for everyone. Then you could write a SConstruct with dependent
tasks in a normal build system way. e.g.

target = env.Command("a task", ...)
platlib = env.Whl("platlib", target, root=".")
whl = env.WhlFile(platlib)

and have each step re-build only when its sources change.

Here is a stackoverflow answer about custom distutils commands.
https://stackoverflow.com/questions/1710839/custom-distutils-commands

--0000000000003411da05b670d3c6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>You would have to have a high tolera=
nce for learning SCons. I&#39;m aware that this is not for everyone. Then y=
ou could write a SConstruct with dependent tasks in a normal build system w=
ay. e.g.<br></div><div><br></div><div>target =3D env.Command(&quot;a task&q=
uot;, ...)</div><div><span class=3D"gmail-pl-s1">platlib</span> <span class=
=3D"gmail-pl-c1">=3D</span> <span class=3D"gmail-pl-s1">env</span>.<span cl=
ass=3D"gmail-pl-v">Whl</span>(<span class=3D"gmail-pl-s">&quot;platlib&quot=
;</span>, target, <span class=3D"gmail-pl-s1">root</span><span class=3D"gma=
il-pl-c1">=3D</span><span class=3D"gmail-pl-s">&quot;.&quot;</span>)</div><=
div><span class=3D"gmail-pl-s1">whl</span> <span class=3D"gmail-pl-c1">=3D<=
/span> <span class=3D"gmail-pl-s1">env</span>.<span class=3D"gmail-pl-v">Wh=
lFile</span>(platlib)</div><div><br></div><div>and have each step re-build =
only when its sources change.</div><div><br></div><div>Here is a stackoverf=
low answer about custom distutils commands. <a href=3D"https://stackoverflo=
w.com/questions/1710839/custom-distutils-commands">https://stackoverflow.co=
m/questions/1710839/custom-distutils-commands</a></div></div></div>

--0000000000003411da05b670d3c6--

--===============6686283861879125906==
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/QMFJZ4O6XFUE3FLRSH5J4BBJT436F43L/

--===============6686283861879125906==--