Rob wrote: > 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?
If you have a built egg (which you can do with python setup.py egg_info, without actually installing anything) you can read the requires.txt file with pkg_resources. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
