from toydist.package import \
        PackageDescription

def distutils_to_package_description(dist):
    name = dist.get_name()
    version = dist.get_version()
    py_modules = dist.py_modules
    packages = dist.packages
    extensions = dist.ext_modules

    return PackageDescription(name, version=version, py_modules=py_modules,
            packages=packages, extensions=extensions)

@@ -99,20 +99,43 @@
 t):%0A    
+data = %7B%7D%0A%0A    data%5B'
 name
+'%5D
  = dist.
@@ -149,23 +149,31 @@
 e()%0A    
+data%5B'
 version
+'%5D
  = dist.
@@ -194,165 +194,324 @@
     
-py_modules = dist.py_modules%0A    packages = dist.packages%0A    extensions = dist.ext_modules%0A%0A    return PackageDescription(name, version=version, py_modules=
+data%5B'author'%5D = dist.get_author()%0A    data%5B'author_email'%5D = dist.get_author_email()%0A    data%5B'maintainer'%5D = dist.get_contact()%0A    data%5B'maintainer_email'%5D = dist.get_contact_email()%0A    data%5B'summary'%5D = dist.get_description()%0A    data%5B'description'%5D = dist.get_long_description()%0A%0A    data%5B'py_modules'%5D = dist.
 py_m
@@ -520,60 +520,123 @@
 ules
-,
 %0A    
-        packages=packages, extensions=extensions
+data%5B'packages'%5D = dist.packages%0A    data%5B'extensions'%5D = dist.ext_modules%0A%0A    return PackageDescription(**data
 )%0A

add more metadata in distutils -> static conversion.