Commit b70e35b3 authored by Tres Seaver's avatar Tres Seaver

Snapshot as-yet-incomplete efforts.

parent d20b7de0
...@@ -230,6 +230,27 @@ class ZopeCmd(ZDCmd): ...@@ -230,6 +230,27 @@ class ZopeCmd(ZDCmd):
def help_adduser(self): def help_adduser(self):
print "adduser <name> <password> -- add a Zope management user" print "adduser <name> <password> -- add a Zope management user"
def do_whisk(self, arg):
from setuptools.command.easy_install import main
import site
args = filter(None, arg.split(' '))
instance_home = os.getenv('INSTANCE_HOME')
software_home = os.getenv('SOFTWARE_HOME')
instance_lib = os.path.join(instance_home, 'lib', 'python')
args = ['--multi-version', '--install-dir', instance_lib] + args
sys.path.insert(0, software_home)
sys.path.insert(0, instance_lib)
site.addsitedir(instance_lib)
try:
main(args)
except:
import traceback
traceback.print_exc()
def help_whisk(self):
print ("whisk <packagename> -- add an egg, and its dependencies, "
" to $INSTANCE_HOME/lib/python")
def do_test(self, arg): def do_test(self, arg):
args = filter(None, arg.split(' ')) args = filter(None, arg.split(' '))
......
...@@ -18,5 +18,10 @@ multiple directories. ...@@ -18,5 +18,10 @@ multiple directories.
$Id$ $Id$
""" """
from pkgutil import extend_path try:
__path__ = extend_path(__path__, __name__) import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
...@@ -15,4 +15,9 @@ ...@@ -15,4 +15,9 @@
$Id$ $Id$
""" """
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment