Skip to content

Commit

Permalink
better build and seperation with new cmd line runner
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.plone.org/svn/collective/pretaweb.funnelweb/trunk@109030 db7f04ef-aaf3-0310-a811-c281ed44c4ad
  • Loading branch information
djay committed Jan 20, 2010
1 parent c35e32b commit fe5bd18
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 34 deletions.
6 changes: 6 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parts =
instance
test
# roadrunner
omelette
extends =
http://dist.plone.org/release/3.3/versions.cfg
# http://good-py.appspot.com/release/dexterity/1.0a1?plone=3.3rc2
Expand Down Expand Up @@ -57,6 +58,11 @@ zope2-instance = instance
packages-under-test =
pretaweb.funnelweb==0.2

[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}

[versions]
zc.buildout=1.4.1
roadrunner = 0.2.3.1
z3c.form = 1.9.0
35 changes: 2 additions & 33 deletions pretaweb/funnelweb/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


<include package="collective.transmogrifier" file="meta.zcml"/>
<include package="collective.transmogrifier"/>
<!-- <include package="collective.transmogrifier"/> -->
<include package="plone.app.transmogrifier"/>

<adapter
Expand All @@ -17,38 +17,7 @@
/>


<utility component=".webcrawler.WebCrawler"
name="pretaweb.funnelweb.webcrawler" />
<utility component=".treeserializer.TreeSerializer"
name="pretaweb.funnelweb.treeserializer" />
<utility component=".typerecognitor.TypeRecognitor"
name="pretaweb.funnelweb.typerecognitor" />

<utility component=".templatefinder.TemplateFinder"
name="pretaweb.funnelweb.templatefinder" />

<utility component=".relinker.Relinker"
name="pretaweb.funnelweb.relinker" />
<utility component=".safeportaltransforms.SafePortalTransforms"
name="pretaweb.funnelweb.safeportaltransforms" />
<utility component=".simplexpath.SimpleXPath"
name="pretaweb.funnelweb.simplexpath" />
<utility component=".backlinkstitle.BacklinksTitle"
name="pretaweb.funnelweb.backlinkstitle" />
<utility component=".isindex.IsIndex"
name="pretaweb.funnelweb.isindex" />
<utility component=".pathmover.PathMover"
name="pretaweb.funnelweb.pathmover" />
<utility component=".constructor.SafeConstructorSection"
name="pretaweb.funnelweb.constructor" />
<utility component=".safeatschemaupdater.SafeATSchemaUpdaterSection"
name="pretaweb.funnelweb.safeatschemaupdater" />
<utility component=".makeattachments.MakeAttachments"
name="pretaweb.funnelweb.makeattachments" />
<utility component=".safeworkflowupdater.WorkflowUpdaterSection"
name="pretaweb.funnelweb.workflowupdater" />
<utility component=".debugsection.DebugSection"
name="pretaweb.funnelweb.debugsection" />
<include file="sections.zcml"/>

<include package=".example"/>

Expand Down
44 changes: 44 additions & 0 deletions pretaweb/funnelweb/runner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from collective.transmogrifier.tests import registerConfig
from collective.transmogrifier.transmogrifier import Transmogrifier
from pkg_resources import resource_string, resource_filename
from collective.transmogrifier.transmogrifier import configuration_registry
from Products.Five import zcml
from zope.component import provideUtility
from zope.interface import classProvides, implements
import pretaweb.funnelweb

class Context:
pass

def transmogrify(config, args):
from collective.transmogrifier.transmogrifier import Transmogrifier
# test.globs['transmogrifier'] = Transmogrifier(test.globs['plone'])

import zope.component
import collective.transmogrifier.sections
zcml.load_config('meta.zcml', zope.app.component)
zcml.load_config('meta.zcml', collective.transmogrifier)
zcml.load_config('configure.zcml', collective.transmogrifier.sections)
zcml.load_config('sections.zcml', pretaweb.funnelweb)


context = Context()
configuration_registry.registerConfiguration(
u'transmogrify.config.funnelweb',
u"",
u'', config)

transmogrifier = Transmogrifier(context)
overrides = {}
if type(args) == type(''):
for arg in args:
section,keyvalue = arg.split(':',1)
key,value = keyvalue.split('=',1)
overrides.setdefault('section',{})[key] = value
else:
overrides = args

transmogrifier(u'transmogrify.config.funnelweb', **overrides)

if __name__ == '__main__':
main()
52 changes: 52 additions & 0 deletions pretaweb/funnelweb/sections.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<configure
xmlns="http://namespaces.zope.org/zope"
i18n_domain="pretaweb.funnelweb"
xmlns:five="http://namespaces.zope.org/five"
>



<utility component=".webcrawler.WebCrawler"
name="pretaweb.funnelweb.webcrawler" />
<utility component=".treeserializer.TreeSerializer"
name="pretaweb.funnelweb.treeserializer" />
<utility component=".typerecognitor.TypeRecognitor"
name="pretaweb.funnelweb.typerecognitor" />

<utility component=".templatefinder.TemplateFinder"
name="pretaweb.funnelweb.templatefinder" />

<utility component=".relinker.Relinker"
name="pretaweb.funnelweb.relinker" />
<utility component=".safeportaltransforms.SafePortalTransforms"
name="pretaweb.funnelweb.safeportaltransforms" />
<utility component=".simplexpath.SimpleXPath"
name="pretaweb.funnelweb.simplexpath" />
<utility component=".backlinkstitle.BacklinksTitle"
name="pretaweb.funnelweb.backlinkstitle" />
<utility component=".isindex.IsIndex"
name="pretaweb.funnelweb.isindex" />
<utility component=".pathmover.PathMover"
name="pretaweb.funnelweb.pathmover" />
<utility component=".constructor.SafeConstructorSection"
name="pretaweb.funnelweb.constructor" />
<utility component=".safeatschemaupdater.SafeATSchemaUpdaterSection"
name="pretaweb.funnelweb.safeatschemaupdater" />
<utility component=".makeattachments.MakeAttachments"
name="pretaweb.funnelweb.makeattachments" />
<utility component=".safeworkflowupdater.WorkflowUpdaterSection"
name="pretaweb.funnelweb.workflowupdater" />
<utility component=".debugsection.DebugSection"
name="pretaweb.funnelweb.debugsection" />
<!--
<utility component=".remoteconstructor.RemoteConstructorSection"
name="pretaweb.funnelweb.remoteconstructor" />
<utility component=".fsconstructor.FSConstructorSection"
name="pretaweb.funnelweb.fsconstructor" />
<utility component=".fsschemaupdater.FSSchemaUpdaterSection"
name="pretaweb.funnelweb.fsschemaupdater" />
-->
<utility component=".staticcreator.StaticCreatorSection"
name="pretaweb.funnelweb.staticcreator" />

</configure>
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
'plone.i18n',
'plone.app.z3cform',
'plone.z3cform',
'zc.testbrowser',
],
entry_points="""
[z3c.autoinclude.plugin]
Expand Down

0 comments on commit fe5bd18

Please sign in to comment.