Using distutils 2.4 for python 2.3

John J. Lee jjl at pobox.com
Sat Sep 24 12:39:13 CEST 2005


Noam Raphael <noamraph at remove.the.dot.gm.ail.com> writes:

> Fredrik Lundh wrote:
> > 
> > you can enable new metadata fields in older versions by assigning to
> > the DistributionMetadata structure:
> > 
> >     try:
> >         from distutils.dist import DistributionMetadata
> >         DistributionMetadata.package_data = None
> >     except:
> >         pass
> > 
> >     setup(
> >         ...
> >         package_data=...
> >     )
> > 
> > </F> 
> 
> I tried this, but it made python2.4 behave like python2.3, and not 
> install the package_data files.
> 
> Did I do something wrong?

I'm *guessing* should have been something like (untested):

from distutils.dist import DistributionMetadata
try:
    DistributionMetadata.classifiers
except AttributeError:
    DistributionMetadata.classifiers = None

setup(
    ...
    classifiers=...
)


John




More information about the Python-list mailing list