[Distutils] Parsing setup()

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


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?


More information about the Distutils-SIG mailing list