dulwich-users team mailing list archive
-
dulwich-users team
-
Mailing list archive
-
Message #00456
[RFC/PATCH] Provide an app_factory entry point for serving via Paster
Just found dulwich, and was excited to see an existing WSGI app
infrastructure. The attached patch implements an app_factory entry
point for Paster [1]. Basically, it allows dulwich's existing
HTTPGitApplication WSGI application to be served by paster with a
minimum of configuration.
I added a bare-bones paster.ini file to docs/ that can be tested
inside a cloned dulwich repo with the patch via:
$ pip install PasteScript
$ paster serve docs/paster.ini
Starting server in PID 38615.
serving on http://127.0.0.1:8000
This behaves similarly to the default bin/dul-web server, in that it
serves up the current working directory as / .
The patch has an example showing all the features, but I'll add it inline here:
File-system layout:
+-/var/lib/git
|-foo
|-bar
`-baz
+-/home/git
|-bing
`-bang
paster.ini:
[app:main]
use = egg:dulwich
append_git = True
serve_dirs =
/var/lib/git
/home/git
blerg = /home/dannyboy/src/blerg
Will result in the following being served:
/foo.git => /var/lib/git/foo
/bar.git => /var/lib/git/bar
/baz.git => /var/lib/git/baz
/bing.git => /home/git/bing
/bang.git => /home/git/bang
/blerg.git => /home/dannyboy/src/blerg
1. http://pythonpaste.org/deploy/#egg-uris
Thanks,
David Blewett
Attachment:
paster_appfactory.diff
Description: Binary data
Follow ups