Chris Withers wrote: > How do I automatically get the metadata from my package's setup.py into my > conf.py? (eg: version, package name, author, copyright, etc)
If it is OK for you to depend on an additional package, you could use pkginfo in your conf.py like this: import pkginfo dist = pkginfo.Develop('.') project = dist.name release = dist.version ... You'd have to adapt the path passed to pkginfo.Develop if setup.py and conf.py don't live in the same directory. > I'm using setuptools if that makes it easier... The setuptools command provided by sphinx doesn't currently make use of the metadata provided by setup.py. I've been thinking about making it do so, but maybe it would be even better to have something like the above in sphinx's core, so it might also be used when building the docs in a different way than by using the setuptools plugin. -- Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---