[Distutils] Was I asleep? (Extension instance message)
Greg Ward
gward@python.net
Thu, 24 Aug 2000 22:45:29 -0400
On 24 August 2000, Mark W. Alexander said:
> warning: build_ext: old-style (ext_name, build_info) tuple found in ext_modules
> for extension '(module_name)'-- please convert to Extension instance
>
> Say what?
>
> I don't remember this on the list, and I can't find any docs, so I decipher
> distutils extension.py and make something like:
Hmm, I *thought* I mentioned it on the list. There was no great hue and
cry, so I didn't think it was a big deal. It is documented, but only in
the CVS docs -- I am still trying to work up the courage to beat Perl
and LaTeX2HTML into submission.
Take a look in any of the example setup scripts in examples,
eg. examples/xml_setup.py has:
ext_modules = [Extension('sgmlop',
['extensions/sgmlop.c']),
Extension('xml.unicode.wstrop',
['extensions/wstrop.c']),
Extension('xml.parsers.pyexpat',
['extensions/pyexpat.c',
'extensions/expat/xmltok/xmltok.c',
'extensions/expat/xmltok/xmlrole.c',
'extensions/expat/xmlwf/xmlfile.c',
'extensions/expat/xmlwf/xmlwf.c',
'extensions/expat/xmlwf/codepage.c',
'extensions/expat/xmlparse/xmlparse.c',
'extensions/expat/xmlparse/hashtable.c',
FILEMAP_SRC,],
define_macros = [('XML_NS', None)],
include_dirs = [ 'extensions/expat/xmltok',
'extensions/expat/xmlparse' ],
)
]
which I think you'll agree is a lot more readable (and writeable) than
the old hairy list-of-tuples-of-dicts (or whatever it was) mess.
Greg
--
Greg Ward - Unix nerd gward@python.net
http://starship.python.net/~gward/
What happens if you touch these two wires tog--