[Distutils] Parsing setup()

Rob gentoodev at gmail.com
Mon Jun 4 19:43:24 CEST 2007


Hi,

I'm writing a dependency resolver and I need to parse the setup() function
in setup.py files and get all the packages in the "install_requires =
[...]" list.

Reading setup.py and using regular expressions work ok but not 100% of
the time because people pass a variable sometimes etc.

Any hints on how I can go about parsing the setup function?

Thanks,
Rob


More information about the Distutils-SIG mailing list