move generated code in startup.py into a library

Bug #316799 reported by Martijn Faassen
6
Affects Status Importance Assigned to Milestone
grok
Fix Released
Medium
Michael Haubenwallner

Bug Description

startup.py as created by grokproject contains code that looks generic enough to push into a library.

We have a few options. We could put this code into grok itself. This would require that certain versions of grokproject *have* to have a recent-enough version of Grok, but I think that this is acceptable. If we move it into grok itself, I propose a grok.startup module.

Alternatively we could consider a grokcore.startup package that contains this code instead - with a bit of care this could make newer versions of grokproject still compatible with older versions of Grok as it'd put in a setup.py requirement for grokcore.startup. The Grok core would also have this requirement, so if newer versions of Grok are installed it doesn't need to add grokcore.startup into the project's setup.py anymore (grokproject could detect this).

I'm inclined towards the grokcore.startup approach.

Changed in grok:
assignee: nobody → d2m
importance: Undecided → Medium
milestone: none → 1.0
status: New → Confirmed
Revision history for this message
Uli Fouquet (uli-gnufix) wrote :

Yep, I'd also prefer grokcore.startup over grok.startup. Michael, what do you think? Let's start it, okay?

Revision history for this message
Michael Haubenwallner (d2m) wrote :

ok by me, should be done over the weekend

Revision history for this message
Michael Haubenwallner (d2m) wrote :

thanks uli for creating the initial grokcore.startup layout

changed startup.py to provide local_conf overrides, global_conf path and fallback to 'etc/zope.conf'
http://svn.zope.org/Sandbox/ulif/?rev=95811&view=rev

created a grokproject branch in http://svn.zope.org/Sandbox/d2m/grokproject-grokcore.startup
added grokcore.startup dependency to template_paste/setup.py
removed startup.py from the paster template
http://svn.zope.org/Sandbox/d2m/grokproject-grokcore.startup/?rev=95814&view=rev

grokproject tests are ok

Revision history for this message
Michael Haubenwallner (d2m) wrote :

Btw, we should not forget to talk about how we can add the entry-points (consoles-scripts, paste.app_factory) to setup.py during or after an upgrade to the 1.x version of grokproject.

Maybe we could advice to run existing projects (after upgrading grokproject) with the --zopectl option only?

Revision history for this message
Michael Haubenwallner (d2m) wrote :

grokproject is now configured to use grokcore.startup with the paster templates.

Changed in grok:
status: Confirmed → Fix Committed
Changed in grok:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.