Imported Upstream version 1.3.2
SVN-Git Migration
8 years ago
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: PasteDeploy |
2 | Version: 1.3.1 | |
2 | Version: 1.3.2 | |
3 | 3 | Summary: Load, configure, and compose WSGI applications and servers |
4 | 4 | Home-page: http://pythonpaste.org/deploy/ |
5 | 5 | Author: Ian Bicking |
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: PasteDeploy |
2 | Version: 1.3.1 | |
2 | Version: 1.3.2 | |
3 | 3 | Summary: Load, configure, and compose WSGI applications and servers |
4 | 4 | Home-page: http://pythonpaste.org/deploy/ |
5 | 5 | Author: Ian Bicking |
0 | 0 | MANIFEST.in |
1 | regen-docs | |
1 | 2 | setup.cfg |
2 | 3 | setup.py |
3 | 4 | PasteDeploy.egg-info/PKG-INFO |
8 | 9 | PasteDeploy.egg-info/not-zip-safe |
9 | 10 | PasteDeploy.egg-info/requires.txt |
10 | 11 | PasteDeploy.egg-info/top_level.txt |
12 | docs/conf.py | |
11 | 13 | docs/index.txt |
12 | 14 | docs/license.txt |
13 | 15 | docs/news.txt |
16 | docs/_static/paste.css | |
17 | docs/_templates/layout.html | |
18 | docs/modules/config.txt | |
19 | docs/modules/converters.txt | |
20 | docs/modules/loadwsgi.txt | |
14 | 21 | paste/__init__.py |
15 | 22 | paste/deploy/__init__.py |
16 | 23 | paste/deploy/config.py |
44 | 51 | tests/sample_configs/test_config.ini |
45 | 52 | tests/sample_configs/test_config_included.ini |
46 | 53 | tests/sample_configs/test_filter.ini |
47 | tests/sample_configs/test_filter_with.ini | |
54 | tests/sample_configs/test_filter_with.ini⏎ |
0 | a.invisible-link { | |
1 | color: #fff; | |
2 | text-decoration: none; | |
3 | } | |
4 | ||
5 | a.invisible-link:visited { | |
6 | color: #fff; | |
7 | text-decoration: none; | |
8 | } | |
9 | ||
10 | a.invisible:link { | |
11 | color: #fff; | |
12 | text-decoration: none; | |
13 | } | |
14 |
0 | {% extends "!layout.html" %} | |
1 | ||
2 | {% block extrahead %} | |
3 | {{ super() }} | |
4 | <link rel="stylesheet" type="text/css" | |
5 | href="{{ pathto('_static/paste.css') }}"> | |
6 | {% endblock %} | |
7 | ||
8 | {% block sidebartoc %} | |
9 | <h3><a href="http://pythonpaste.org/" class="invisible-link">Python Paste</a></h3> | |
10 | ||
11 | <ul> | |
12 | <li><a href="http://trac.pythonpaste.org">Issue tracker</a></li> | |
13 | <li><a href="http://pythonpaste.org/">Paste core</a></li> | |
14 | <li><a href="http://pythonpaste.org/deploy/">Paste Deploy</a></li> | |
15 | <li><a href="http://pythonpaste.org/script/">Paste Script</a></li> | |
16 | </ul> | |
17 | ||
18 | {{ super() }} | |
19 | {% endblock %} |
0 | # -*- coding: utf-8 -*- | |
1 | # | |
2 | # Paste documentation build configuration file, created by | |
3 | # sphinx-quickstart on Tue Apr 22 22:08:49 2008. | |
4 | # | |
5 | # This file is execfile()d with the current directory set to its containing dir. | |
6 | # | |
7 | # The contents of this file are pickled, so don't put values in the namespace | |
8 | # that aren't pickleable (module imports are okay, they're removed automatically). | |
9 | # | |
10 | # All configuration values have a default value; values that are commented out | |
11 | # serve to show the default value. | |
12 | ||
13 | import sys | |
14 | ||
15 | # If your extensions are in another directory, add it here. | |
16 | #sys.path.append('some/directory') | |
17 | ||
18 | # General configuration | |
19 | # --------------------- | |
20 | ||
21 | # Add any Sphinx extension module names here, as strings. They can be extensions | |
22 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |
23 | extensions = ['sphinx.ext.autodoc'] | |
24 | ||
25 | # Add any paths that contain templates here, relative to this directory. | |
26 | templates_path = ['_templates'] | |
27 | ||
28 | # The suffix of source filenames. | |
29 | source_suffix = '.txt' | |
30 | ||
31 | # The master toctree document. | |
32 | master_doc = 'index' | |
33 | ||
34 | # General substitutions. | |
35 | project = 'Paste Deploy' | |
36 | copyright = '2008, Ian Bicking' | |
37 | ||
38 | # The default replacements for |version| and |release|, also used in various | |
39 | # other places throughout the built documents. | |
40 | # | |
41 | # The short X.Y version. | |
42 | version = '1.3' | |
43 | # The full version, including alpha/beta/rc tags. | |
44 | release = '1.3.2' | |
45 | ||
46 | # There are two options for replacing |today|: either, you set today to some | |
47 | # non-false value, then it is used: | |
48 | #today = '' | |
49 | # Else, today_fmt is used as the format for a strftime call. | |
50 | today_fmt = '%B %d, %Y' | |
51 | ||
52 | # List of documents that shouldn't be included in the build. | |
53 | #unused_docs = ['include/contact.txt', 'include/reference_header.txt'] | |
54 | ||
55 | # If true, '()' will be appended to :func: etc. cross-reference text. | |
56 | #add_function_parentheses = True | |
57 | ||
58 | # If true, the current module name will be prepended to all description | |
59 | # unit titles (such as .. function::). | |
60 | #add_module_names = True | |
61 | ||
62 | # If true, sectionauthor and moduleauthor directives will be shown in the | |
63 | # output. They are ignored by default. | |
64 | #show_authors = False | |
65 | ||
66 | # The name of the Pygments (syntax highlighting) style to use. | |
67 | pygments_style = 'sphinx' | |
68 | ||
69 | ||
70 | # Options for HTML output | |
71 | # ----------------------- | |
72 | ||
73 | # The style sheet to use for HTML and HTML Help pages. A file of that name | |
74 | # must exist either in Sphinx' static/ path, or in one of the custom paths | |
75 | # given in html_static_path. | |
76 | html_style = 'default.css' | |
77 | ||
78 | # Add any paths that contain custom static files (such as style sheets) here, | |
79 | # relative to this directory. They are copied after the builtin static files, | |
80 | # so a file named "default.css" will overwrite the builtin "default.css". | |
81 | html_static_path = ['_static'] | |
82 | ||
83 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |
84 | # using the given strftime format. | |
85 | html_last_updated_fmt = '%b %d, %Y' | |
86 | ||
87 | # If true, SmartyPants will be used to convert quotes and dashes to | |
88 | # typographically correct entities. | |
89 | #html_use_smartypants = True | |
90 | ||
91 | # Content template for the index page. | |
92 | #html_index = '' | |
93 | ||
94 | # Custom sidebar templates, maps document names to template names. | |
95 | #html_sidebars = {} | |
96 | ||
97 | # Additional templates that should be rendered to pages, maps page names to | |
98 | # template names. | |
99 | #html_additional_pages = {} | |
100 | ||
101 | # If false, no module index is generated. | |
102 | #html_use_modindex = True | |
103 | ||
104 | # If true, the reST sources are included in the HTML build as _sources/<name>. | |
105 | #html_copy_source = True | |
106 | ||
107 | # Output file base name for HTML help builder. | |
108 | htmlhelp_basename = 'PasteDeploydoc' | |
109 | ||
110 | ||
111 | # Options for LaTeX output | |
112 | # ------------------------ | |
113 | ||
114 | # The paper size ('letter' or 'a4'). | |
115 | #latex_paper_size = 'letter' | |
116 | ||
117 | # The font size ('10pt', '11pt' or '12pt'). | |
118 | #latex_font_size = '10pt' | |
119 | ||
120 | # Grouping the document tree into LaTeX files. List of tuples | |
121 | # (source start file, target name, title, author, document class [howto/manual]). | |
122 | #latex_documents = [] | |
123 | ||
124 | # Additional stuff for the LaTeX preamble. | |
125 | #latex_preamble = '' | |
126 | ||
127 | # Documents to append as an appendix to all manuals. | |
128 | #latex_appendices = [] | |
129 | ||
130 | # If false, no module index is generated. | |
131 | #latex_use_modindex = True |
1 | 1 | ================ |
2 | 2 | |
3 | 3 | :author: Ian Bicking <ianb@colorstudy.com> |
4 | :revision: $Rev: 5845 $ | |
5 | :date: $LastChangedDate: 2006-10-22 15:33:08 -0500 (Sun, 22 Oct 2006) $ | |
6 | 4 | |
7 | 5 | .. contents:: |
6 | ||
7 | Documents: | |
8 | ||
9 | .. toctree:: | |
10 | :maxdepth: 1 | |
11 | ||
12 | news | |
13 | modules/loadwsgi | |
14 | modules/config | |
15 | modules/converters | |
16 | license | |
8 | 17 | |
9 | 18 | .. comment: |
10 | 19 | The names used in sections should be more concrete, and it should |
0 | :mod:`paste.deploy.config` -- Configuration and Environment middleware | |
1 | ====================================================================== | |
2 | ||
3 | .. automodule:: paste.deploy.config | |
4 | ||
5 | Module Contents | |
6 | --------------- | |
7 | ||
8 | .. autoclass:: DispatchingConfig | |
9 | .. autoclass:: ConfigMiddleware | |
10 | .. autoclass:: PrefixMiddleware | |
11 | ||
12 | .. comment: FIXME: do something about CONFIG (manual docs?) |
0 | :mod:`paste.deploy.converters` -- Conversion helpers for String Configuration | |
1 | ============================================================================= | |
2 | ||
3 | .. automodule:: paste.deploy.converters | |
4 | ||
5 | Module Contents | |
6 | --------------- | |
7 | ||
8 | .. autofunction:: asbool | |
9 | .. autofunction:: asint | |
10 | .. autofunction:: aslist |
0 | :mod:`paste.deploy.loadwsgi` -- Load WSGI applications from config files | |
1 | ======================================================================== | |
2 | ||
3 | .. automodule:: paste.deploy.loadwsgi | |
4 | ||
5 | Module Contents | |
6 | --------------- | |
7 | ||
8 | .. autofunction:: loadapp | |
9 | .. autofunction:: loadserver | |
10 | .. autofunction:: loadfilter | |
11 | .. autofunction;: appconfig | |
12 |
0 | 0 | Paste Deployment News |
1 | 1 | ===================== |
2 | ||
3 | 1.3.2 | |
4 | ----- | |
5 | ||
6 | * Added ``paste.deploy.converters.asint()``. | |
7 | * fixed use sections overwriting the config's __file__ value with the | |
8 | use'd filename. | |
9 | * ``paste.deploy.loadwsgi`` now supports variable expansion in the | |
10 | DEFAULT section of config files (unlike plain ConfigParser). | |
2 | 11 | |
3 | 12 | 1.3.1 |
4 | 13 | ----- |
7 | 7 | from pkgutil import extend_path |
8 | 8 | __path__ = extend_path(__path__, __name__) |
9 | 9 | |
10 | import modulefinder | |
11 | for p in __path__: | |
12 | modulefinder.AddPackagePath(__name__, p) | |
10 | try: | |
11 | import modulefinder | |
12 | except ImportError: | |
13 | pass | |
14 | else: | |
15 | for p in __path__: | |
16 | modulefinder.AddPackagePath(__name__, p) | |
13 | 17 |
214 | 214 | To filter your application through a PrefixMiddleware instance, add the |
215 | 215 | following to the '[app:main]' section of your .ini file: |
216 | 216 | |
217 | .. code-block:: PasteIni | |
217 | .. code-block:: ini | |
218 | 218 | |
219 | 219 | filter-with = proxy-prefix |
220 | 220 | |
255 | 255 | if not url: url = '/' |
256 | 256 | environ['PATH_INFO'] = url |
257 | 257 | environ['SCRIPT_NAME'] = self.prefix |
258 | if (self.translate_forwarded_server and | |
259 | 'HTTP_X_FORWARDED_SERVER' in environ): | |
260 | environ['HTTP_HOST'] = environ.pop('HTTP_X_FORWARDED_SERVER') | |
258 | if self.translate_forwarded_server: | |
259 | if 'HTTP_X_FORWARDED_SERVER' in environ: | |
260 | environ['SERVER_NAME'] = environ['HTTP_HOST'] = environ.pop('HTTP_X_FORWARDED_SERVER') | |
261 | if 'HTTP_X_FORWARDED_HOST' in environ: | |
262 | environ['HTTP_HOST'] = environ.pop('HTTP_X_FORWARDED_HOST') | |
261 | 263 | if self.force_port is not None: |
262 | 264 | host = environ.get('HTTP_HOST', '').split(':', 1)[0] |
263 | 265 | if self.force_port: |
11 | 11 | "String is not true/false: %r" % obj) |
12 | 12 | return bool(obj) |
13 | 13 | |
14 | def asint(obj): | |
15 | try: | |
16 | return int(obj) | |
17 | except (TypeError, ValueError), e: | |
18 | raise ValueError( | |
19 | "Bad integer value: %r" % obj) | |
20 | ||
14 | 21 | def aslist(obj, sep=None, strip=True): |
15 | 22 | if isinstance(obj, (str, unicode)): |
16 | 23 | lst = obj.split(sep) |
44 | 44 | def __init__(self, filename, *args, **kw): |
45 | 45 | ConfigParser.__init__(self, *args, **kw) |
46 | 46 | self.filename = filename |
47 | ||
48 | def defaults(self): | |
49 | """Return the defaults, with their values interpolated (with the | |
50 | defaults dict itself) | |
51 | ||
52 | Mainly to support defaults using values such as %(here)s | |
53 | """ | |
54 | defaults = ConfigParser.defaults(self).copy() | |
55 | for key, val in defaults.iteritems(): | |
56 | defaults[key] = self._interpolate('DEFAULT', key, val, defaults) | |
57 | return defaults | |
47 | 58 | |
48 | 59 | def _interpolate(self, section, option, rawval, vars): |
49 | 60 | try: |
323 | 334 | # Stupid ConfigParser ignores files that aren't found, so |
324 | 335 | # we have to add an extra check: |
325 | 336 | if not os.path.exists(filename): |
337 | if filename.strip() != filename: | |
338 | raise OSError( | |
339 | "File %r not found; trailing whitespace: " | |
340 | "did you try to use a # on the same line as a filename? " | |
341 | "(comments must be on their own line)" % filename) | |
326 | 342 | raise OSError( |
327 | 343 | "File %r not found" % filename) |
328 | 344 | self.parser.read(filename) |
414 | 430 | object_type, name=use, global_conf=global_conf) |
415 | 431 | context.global_conf.update(global_additions) |
416 | 432 | context.local_conf.update(local_conf) |
433 | if '__file__' in global_conf: | |
434 | # use sections shouldn't overwrite the original __file__ | |
435 | context.global_conf['__file__'] = global_conf['__file__'] | |
417 | 436 | # @@: Should loader be overwritten? |
418 | 437 | context.loader = self |
419 | 438 | return context |
0 | #!/bin/sh | |
1 | ||
2 | mkdir -p docs/_static docs/_build | |
3 | sphinx-build -E -b html docs/ docs/_build || exit 1 | |
4 | if [ "$1" = "publish" ] ; then | |
5 | cd docs/ | |
6 | echo "Uploading files..." | |
7 | scp -r _build/* ianb@webwareforpython.org:/home/paste/htdocs/deploy/ | |
8 | fi |
0 | 0 | from setuptools import setup, find_packages |
1 | 1 | |
2 | version = '1.3.1' | |
2 | version = '1.3.2' | |
3 | 3 | |
4 | 4 | setup( |
5 | 5 | name="PasteDeploy", |