On Mon, Apr 13, 2009 at 2:10 PM, Mike Orr <[email protected]> wrote: > > On Sun, Apr 12, 2009 at 2:56 AM, Noah Gift <[email protected]> wrote: >> >> I said I would get this done this weekend, so here it is: >> >> If you check out go-pylons.txt and the README.txt, it shows that I >> simply added a resource directory that will contain all of the code >> for a framework. Next I added these lines to the go-pylons.py >> boostrap script: >> >> #hack to install local source code >> path = "resources" >> for dir in os.listdir(path): >> source_dir = "%s/%s" % (path,dir) >> subprocess.call([join(bin_dir, 'easy_install'), >> source_dir]) >> >> This should work for any framework, but I need to write something to >> parse a setup.py and then run: >> easy_install -eb resources "found egg" >> "found egg" being the egg found in setup.py >> >> http://bitbucket.org/noahgift/bootstrap_pylons/ >> >> At this point it only took about 5 lines a code, but if we want to >> automatically parse setup.py it may take a bit more work. I wonder >> what Ian thinks of this? Anyone feel free to slice, and dice, and >> fix. > > I gave it a test run on Linux. According to the output, it installed > resources/pylons, and then downloaded all the dependencies. The > virtualenv has everything installed in the easy_install manner (i.e., > .egg directories).
Note, that I didn't "really" have all the dependencies, I just pylons in there. It was good for testing, but I need to finish that part, and automate it into a script. Ideally someone could run a pre-boostrap config script that pulls all of these raw source files into the resources directory. > > It looks like a good start. Four comments: > > - I would rename resources/pylons to resources/Pylons so that it's > clear it's a source directory and not a package or a preinstalled > package. I had to guess from the contents what it was. will do. > > - Virtualenv is going to automatically install pip soon, so I would do > a pip-based install. For now you can put pip in resouces, > easy_install it, and then pip install the rest. That would eliminate > most of the entries in easy-install.pth. (One problem is that pip > doesn't install from source directories without the -e option. I > don't know why that is.) sounds good. I also like the idea of including a boostrapped setuptools and pip as well. I recently saw a new failure in which setuptools required a newer version of itself. It would be nice if someone downloaded a tar.gz of this, and simply ran go-pylons.py and things work, zero dependencies on anything... > > - Is there some advantage to putting the source directories in > resources/ unpacked rather than just copying the tarballs from > http://pylonshq.com/download ? Since easy_install/pip know how to > unpack them, I'm not sure if the slight added efficiency is worth it. I agree too. I just didn't know where they lived. Also, one PITA is that I need a parser to strip out the dependencies from setup.py so I can pipe that into a script..this is basic a build script to generate the resources needed for this bootstrap package. > > - Is there a way to call easy_install without using subprocess? I'm > always leery of scripts that call subprocesses, since they can break > if the path or environment isn't what's expected. But that may be an > advanced issue to deal with later. Hmm, that might be an issue on Windows, but I don't run Windows much, your right. I might have to punt on this until I figure out a better way. > > -- > Mike Orr <[email protected]> > > > > -- Cheers, Noah --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
