-
Notifications
You must be signed in to change notification settings - Fork 0
Glue
Glue is the working name for a rewrite of the portions of PasteScript which we use in Pyramid. Rationale: porting PasteScript to Python 3 in its entirety is too much effort, as PasteScript relies on Paste itself, which is huge. We just don't use that much of it.
Glue should do the following:
-
offer up a "Command" class which can be subclassed (or at least define an interface for a command class that can be implemented) that allows folks to create analogues of "paster" commands such as "pshell", "pviews", etc.
-
install a "glue" console script which replaces "paster" and which does mostly the same thing, save for doing "create", which it may or may not be responsible for (we might do scaffold rendering in a separate package, or in Pyramid itself). It should be able to search for setuptools entry points for commands and it should be able execute them. It should also be willing to serve up an application/pipeline defined in an ini file that's written in a PasteDeploy-compatible form.
A prototype exists at https://github.com/Pylons/glue. The prototype depends on PasteDeploy (which already has machinery to read a Paste-compatible .ini file and do application serving). It currently implements "create", "serve" and "help".
The Pyramid branch named "feature.glue" replaces its Paste dependencies with the glue prototype and is able to create and serve projects from its internal scaffolding ala glue create -t pyramid_starter foo; cd foo; $myenv/bin/python setup.py develop; $myenv/bin/glue serve development.ini
on Python 2.6, 2.7 and Python 3.2.
If the "glue" package is to become "real" it needs a lot more unit tests. It may also be beneficial to just inline the code from PasteDeploy into it, because a) PasteDeploy has some annoying niggles like the difference between "use" and "paste.app_factory" and b) we're going to need to document the file format, API, and semantics in context anyway.