[Distutils] Distutils 1.0.1 releasee
Mon Oct 16 05:40:10 2000
Hello, nice to mail you.
>I've just released Distutils 1.0.1. This is identical to the code in
>the last snapshot (20001014). And this is the code that will go out
>with Python 2.0.
>Now off to deal with the latest bug reports and feature requests... as
>if things quiet down just because of a major Python release... oh
I have a feature request. At the moment I am storing configuration values
in a Python module file <packagename>Conf.py.
This file can include values from the config command (libs, includes),
from the install command (install dirs), metadata and customized values
varying from package to package.
Okay, here is an example. I am using localization .mo/.po files in my
program and I need to know at runtime where these files are. So I look in
the <packagename>Conf.py module for 'install_data' attribute and search
After all, should we implement a function to generate such a
configuration module? This would be a little like the .ini file for the
Attached is the function I am using for this now, very rough as usual ;)
# self.config_file = self.get_name()+"Conf.py"
def create_conf_file(self, directory, data=):
data.insert(0, "# this file is automatically created by setup.py")
filename = os.path.join(directory, self.config_file)
# add metadata
metanames = dir(self.metadata) + \
['fullname', 'contact', 'contact_email']
for name in metanames:
method = "get_" + name
cmd = "%s = %s" % (name, `getattr(self.metadata, method)()`)
# write file
util.execute(write_file, (filename, data),
"creating %s" % filename, self.verbose>=1, self.dry_run)