[Distutils] introspecting package data

David Lyon david.lyon at preisshare.net
Tue Jun 30 16:04:52 CEST 2009


On Tue, 30 Jun 2009 14:24:30 +0100, Chris Withers <chris at simplistix.co.uk>
wrote:
> I'm building Sphinx documentation, but I want the conf.py to be driven 
> right from the package it's in, rather than having to manually enter the 
> information again...

It's such a good point...

Maybe I have it wrong and don't know something... but I take it
you're talking about the information we already have to put in
the setup.py.....

--setup.py----------------------------
#!/usr/bin/env python

from distutils.core import setup

setup(name='myproject',
      version='0.11',
      description='myPetProject',
      author='James Smith',
      author_email='smith at nowhere.net',
      url='http://www.yahoo.net/pet',
      scripts=['petproject.py'],
      data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']),
                  ('config', ['cfg/data.cfg']),
                  ('/etc/init.d', ['init-script'])]
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Environment :: Web Environment',
          'Intended Audience :: End Users/Desktop',
          'Intended Audience :: Developers',
          'Intended Audience :: System Administrators',
          'License :: OSI Approved :: Python Software Foundation License',
          'Operating System :: MacOS :: MacOS X',
          'Operating System :: Microsoft :: Windows',
          'Operating System :: POSIX',
          'Programming Language :: Python',
          'Topic :: Communications :: Email',
          'Topic :: Office/Business',
          'Topic :: Software Development :: Bug Tracking',
          ],
      
     )

--------------------------------------

Yes, it would be cool to be able to read this out and
autoupdate the build/version numbers.....

Regards

David



More information about the Distutils-SIG mailing list