[Zope-dev] Extending Zope2 bin/instance run

Tres Seaver tseaver at palladion.com
Fri Sep 3 12:21:08 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wichert Akkerman wrote:
> I have noticed that now that we are almost exclusively using eggs to 
> distribute our software using "bin/instance run" has become difficult: 
> often the script you want to run is located inside an egg which makes to 
> path to it hard to predict. This is not the most user friendly command:
> 
>    bin/instance run eggs/my.package-*/my/package/script.py
> 
> If a user is using a shared egg directory from zc.buildout or something 
> else the egg can be anywhere on the filesystem, making it next to 
> impossible to explain to users.
> 
> I am considering to modify bin/instance run to check if its first 
> argument is a filesystem path, and if not consider the argument to be a 
> dotted name of a callable which should be invoke. That way backwards 
> compatibility remains, but you can now also do this:
> 
>    bin/instance run my.package.script.main

What about using something like the EntryPoint syntax:

 $ bin/instance run my.package.script:main

We could even add a new entry point class for it, and allow:

 $ bin/instance run egg:my.package#some_name

> I am not sure if this is best done in plone.recipe.zope2instance or 
> Zope2.Startup.zopectl. They have differing versions of ZopeCmd. Perhaps 
> the plone.recipe.zope2instance code should be merged into Zope2's 
> original as well?

I don't know anything about the code in plone.recipe.zope2instance.




Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkyBIHQACgkQ+gerLs4ltQ5v1wCfcnSHwVEQ76SmlftN716mc7t3
C7IAoJHxDMrH/LW1WO40k1pFXC5RP0su
=Hrl+
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list