Distutils: compilation of generated code.

J

Jacek Generowicz

I am using a Python program to generate the C++ source code of an
extension module in a package which is managed by distutils. What's
the best way to instruct distutils to re-generate the code before
compiling it, if and only if the generation program is newer than the
generated code ?

[Yes, I am aware that something like cog
http://www.nedbatchelder.com/code/cog/index.html offers an alternative
approach, but, for mainly political reasons, the package cannot depend
on anything not in the standard Python distribution.]
 
T

Thomas Heller

Jacek Generowicz said:
I am using a Python program to generate the C++ source code of an
extension module in a package which is managed by distutils. What's
the best way to instruct distutils to re-generate the code before
compiling it, if and only if the generation program is newer than the
generated code ?

subclass distutils build_ext command.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,968
Members
47,518
Latest member
TobiasAxf

Latest Threads

Top