Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- Drop dependency on PasteScript (Pyramid 1.3 compat).

- Rename "paster_templates" dir to "scaffolds".

- Make scaffold compatible with Pyramid 1.3a2+.

- Drop scaffolding dependency on WebError.

- Scaffold now uses ``pyramid#wsgiref`` server instead of ``paste#http``
  server.  This will require the use of Pyramid 1.0.2, 1.1.3, 1.2.5, or
  1.3a2+.
  • Loading branch information...
commit d9349bb9cf19bf7c65a31cf19f6372a24bf4eea2 1 parent 126c7dc
Chris McDonough authored December 14, 2011

Showing 24 changed files with 38 additions and 21 deletions. Show diff stats Hide diff stats

  1. 15  CHANGES.txt
  2. 15  pyramid_zcml/__init__.py
  3. 18  pyramid_zcml/scaffolds/__init__.py
  4. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/__init__.py_tmpl
  5. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/configure.zcml
  6. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/resources.py
  7. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/favicon.ico
  8. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/footerbg.png
  9. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/headerbg.png
  10. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/ie6.css
  11. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/middlebg.png
  12. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/pylons.css
  13. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/pyramid-small.png
  14. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/pyramid.png
  15. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/static/transparent.gif
  16. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/templates/mytemplate.pt_tmpl
  17. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/tests.py_tmpl
  18. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/+package+/views.py_tmpl
  19. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/CHANGES.txt_tmpl
  20. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/README.txt_tmpl
  21. 3  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/development.ini_tmpl
  22. 0  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/setup.cfg_tmpl
  23. 2  pyramid_zcml/{paster_templates → scaffolds}/starter_zcml/setup.py_tmpl
  24. 6  setup.py
15  CHANGES.txt
... ...
@@ -1,3 +1,18 @@
  1
+Next release
  2
+------------
  3
+
  4
+- Drop dependency on PasteScript (Pyramid 1.3 compat).
  5
+
  6
+- Rename "paster_templates" dir to "scaffolds".
  7
+
  8
+- Make scaffold compatible with Pyramid 1.3a2+.
  9
+
  10
+- Drop scaffolding dependency on WebError.
  11
+
  12
+- Scaffold now uses ``pyramid#wsgiref`` server instead of ``paste#http``
  13
+  server.  This will require the use of Pyramid 1.0.2, 1.1.3, 1.2.5, or
  14
+  1.3a2+.
  15
+
1 16
 0.8 (2011-12-06)
2 17
 ----------------
3 18
 
15  pyramid_zcml/__init__.py
@@ -2,9 +2,6 @@
2 2
 import sys
3 3
 import threading
4 4
 
5  
-from paste.script.templates import Template
6  
-from paste.util.template import paste_script_template_renderer
7  
-
8 5
 from zope.configuration.fields import GlobalInterface
9 6
 from zope.configuration.fields import GlobalObject
10 7
 from zope.configuration.fields import Tokens
@@ -923,18 +920,6 @@ def make_app(root_factory, package=None, filename='configure.zcml',
923 920
     config.end()
924 921
     return config.make_wsgi_app()
925 922
 
926  
-# paster template helper
927  
-
928  
-class PyramidTemplate(Template):
929  
-    def pre(self, command, output_dir, vars): # pragma: no cover
930  
-        vars['random_string'] = os.urandom(20).encode('hex')
931  
-        return Template.pre(self, command, output_dir, vars)
932  
-
933  
-class StarterZCMLProjectTemplate(PyramidTemplate):
934  
-    _template_dir = 'paster_templates/starter_zcml'
935  
-    summary = 'pyramid starter project (using ZCML)'
936  
-    template_renderer = staticmethod(paste_script_template_renderer)
937  
-
938 923
 # includeme function for config.include'ability
939 924
 
940 925
 def includeme(config):
18  pyramid_zcml/scaffolds/__init__.py
... ...
@@ -0,0 +1,18 @@
  1
+try: # pragma: no cover (pyramid 1.0.X)
  2
+    # "pyramid.paster_templates" doesn't exist past 1.0.X
  3
+    from pyramid.paster import PyramidTemplate
  4
+    from pyramid.paster import paste_script_template_renderer
  5
+except ImportError: # pragma: no cover
  6
+    try: # pragma: no cover (pyramid 1.1.X, 1.2.X)
  7
+        # trying to import "paste_script_template_renderer" fails on 1.3.X
  8
+        from pyramid.scaffolds import paste_script_template_renderer
  9
+        from pyramid.scaffolds import PyramidTemplate
  10
+    except ImportError: # pragma: no cover (pyramid >=1.3a2)
  11
+        paste_script_template_renderer = None
  12
+        from pyramid.scaffolds import PyramidTemplate
  13
+
  14
+class StarterZCMLProjectTemplate(PyramidTemplate):
  15
+    _template_dir = 'starter_zcml'
  16
+    summary = 'pyramid starter project (using ZCML)'
  17
+    template_renderer = staticmethod(paste_script_template_renderer)
  18
+
0  ...templates/starter_zcml/+package+/__init__.py_tmpl → ...scaffolds/starter_zcml/+package+/__init__.py_tmpl
File renamed without changes
0  ...r_templates/starter_zcml/+package+/configure.zcml → ...l/scaffolds/starter_zcml/+package+/configure.zcml
File renamed without changes
0  ...ter_templates/starter_zcml/+package+/resources.py → ...cml/scaffolds/starter_zcml/+package+/resources.py
File renamed without changes
0  ...mplates/starter_zcml/+package+/static/favicon.ico → ...affolds/starter_zcml/+package+/static/favicon.ico
File renamed without changes
0  ...plates/starter_zcml/+package+/static/footerbg.png → ...ffolds/starter_zcml/+package+/static/footerbg.png
File renamed without changes
0  ...plates/starter_zcml/+package+/static/headerbg.png → ...ffolds/starter_zcml/+package+/static/headerbg.png
File renamed without changes
0  ...r_templates/starter_zcml/+package+/static/ie6.css → ...l/scaffolds/starter_zcml/+package+/static/ie6.css
File renamed without changes
0  ...plates/starter_zcml/+package+/static/middlebg.png → ...ffolds/starter_zcml/+package+/static/middlebg.png
File renamed without changes
0  ...emplates/starter_zcml/+package+/static/pylons.css → ...caffolds/starter_zcml/+package+/static/pylons.css
File renamed without changes
0  ...s/starter_zcml/+package+/static/pyramid-small.png → ...s/starter_zcml/+package+/static/pyramid-small.png
File renamed without changes
0  ...mplates/starter_zcml/+package+/static/pyramid.png → ...affolds/starter_zcml/+package+/static/pyramid.png
File renamed without changes
0  ...tes/starter_zcml/+package+/static/transparent.gif → ...lds/starter_zcml/+package+/static/transparent.gif
File renamed without changes
0  ...arter_zcml/+package+/templates/mytemplate.pt_tmpl → ...arter_zcml/+package+/templates/mytemplate.pt_tmpl
File renamed without changes
0  ...er_templates/starter_zcml/+package+/tests.py_tmpl → ...ml/scaffolds/starter_zcml/+package+/tests.py_tmpl
File renamed without changes
0  ...er_templates/starter_zcml/+package+/views.py_tmpl → ...ml/scaffolds/starter_zcml/+package+/views.py_tmpl
File renamed without changes
0  ...ml/paster_templates/starter_zcml/CHANGES.txt_tmpl → pyramid_zcml/scaffolds/starter_zcml/CHANGES.txt_tmpl
File renamed without changes
0  ...cml/paster_templates/starter_zcml/README.txt_tmpl → pyramid_zcml/scaffolds/starter_zcml/README.txt_tmpl
File renamed without changes
3  ...aster_templates/starter_zcml/development.ini_tmpl → ..._zcml/scaffolds/starter_zcml/development.ini_tmpl
@@ -9,11 +9,10 @@ default_locale_name = en
9 9
 
10 10
 [pipeline:main]
11 11
 pipeline =
12  
-    egg:WebError#evalerror
13 12
     {{project}}
14 13
 
15 14
 [server:main]
16  
-use = egg:Paste#http
  15
+use = egg:pyramid#wsgiref
17 16
 host = 0.0.0.0
18 17
 port = 6543
19 18
 
0  ...zcml/paster_templates/starter_zcml/setup.cfg_tmpl → pyramid_zcml/scaffolds/starter_zcml/setup.cfg_tmpl
File renamed without changes
2  ..._zcml/paster_templates/starter_zcml/setup.py_tmpl → pyramid_zcml/scaffolds/starter_zcml/setup.py_tmpl
@@ -6,7 +6,7 @@ here = os.path.abspath(os.path.dirname(__file__))
6 6
 README = open(os.path.join(here, 'README.txt')).read()
7 7
 CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
8 8
 
9  
-requires = ['pyramid', 'pyramid_zcml', 'WebError']
  9
+requires = ['pyramid', 'pyramid_zcml']
10 10
 
11 11
 setup(name='{{project}}',
12 12
       version='0.0',
6  setup.py
@@ -25,7 +25,7 @@
25 25
     README = CHANGES = ''
26 26
 
27 27
 install_requires=[
28  
-    'pyramid>=1.0b1', # autktauthenticationpolicy wild_domain
  28
+    'pyramid>=1.0.2', # wsgiref paste entry point
29 29
     'zope.configuration>=3.8.0dev', # dict actions
30 30
     ]
31 31
 
@@ -60,8 +60,8 @@
60 60
       tests_require = tests_require,
61 61
       test_suite="pyramid_zcml",
62 62
       entry_points = """
63  
-      [paste.paster_create_template]
64  
-      pyramid_starter_zcml=pyramid_zcml:StarterZCMLProjectTemplate
  63
+      [pyramid.scaffold]
  64
+      pyramid_starter_zcml=pyramid_zcml.scaffolds:StarterZCMLProjectTemplate
65 65
       """
66 66
       )
67 67
 

0 notes on commit d9349bb

Please sign in to comment.
Something went wrong with that request. Please try again.