using distutils.command.config

J

John Hunter

I am trying to utilize the config module in distutils to test for
certain headers and libraries and fail elegantly if they are not found
with a helpful message. The typical gcc error message when a header
is missing is inscrutable to many.

I have subclassed config and can use my class with

> python setup.py config

The config class finds all the module specific path and library
information, but I am not clear on the best way to get this to the
build process. One option is to save the information to a config
file, eg using a plain text format, creating a python module, or using
pickle, but it seems artificial to me to have to use an intermediate
file. Is there a way to get the config information on a call to
> python setup.py build

My config class looks like

from distutils.command.config import config

class config_mpl(config):
def run (self):
# make sure you can find the headers, link with the libraries,
# etc, and collect per module include_dirs, library_dirs,
# libraries information

One idea is to dump the information from the config call to a
config.pickle, but ideally I would like the config file to be human
readable....

Thanks,
JDH
 

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
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top