[Catalog-sig] New proposal, with PEP

Juergen Hermann Juergen Hermann" <jh@web.de
Mon, 28 Oct 2002 12:17:55 +0200


On Sun, 27 Oct 2002 08:54:29 +1000, Richard Jones wrote:

>> It would also cause the packages to break
>> on older distutils installations.
>
>That's a problem, yes. I'm not sure what the solution would be. Older p=
ackages 
>run with the new code wouldn't have a problem. Newer packages run with =
older 
>code will break on the "trove" keyword argument to setup(). I'm not sur=
e what 
>the solution would be.

We already had such breakage with older distutils versions (pre 1.0 I th=
ink), and 
my way to solve it was:

if hasattr(distutils.dist.DistributionMetadata, 'get_keywords'):
    setup_args['keywords'] =3D "wiki web"

if hasattr(distutils.dist.DistributionMetadata, 'get_platforms'):
    setup_args['platforms'] =3D "win32 posix"

apply(setup, (), setup_args)



Some official distutils "capability" mechanism would be nicer, of course=
. Don't 
check version numbers!



Ciao, J=FCrgen

--
J=FCrgen Hermann, Developer
WEB.DE AG, http://webde-ag.de/