[Zope-Checkins]
SVN: Zope/branches/tseaver-instlib_as_site_dir/lib/python/
Snapshot as-yet-incomplete efforts.
Tres Seaver
tseaver at palladion.com
Sun May 6 21:35:47 EDT 2007
Log message for revision 75597:
Snapshot as-yet-incomplete efforts.
Changed:
U Zope/branches/tseaver-instlib_as_site_dir/lib/python/Zope2/Startup/zopectl.py
U Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/__init__.py
U Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/app/__init__.py
-=-
Modified: Zope/branches/tseaver-instlib_as_site_dir/lib/python/Zope2/Startup/zopectl.py
===================================================================
--- Zope/branches/tseaver-instlib_as_site_dir/lib/python/Zope2/Startup/zopectl.py 2007-05-07 00:41:00 UTC (rev 75596)
+++ Zope/branches/tseaver-instlib_as_site_dir/lib/python/Zope2/Startup/zopectl.py 2007-05-07 01:35:46 UTC (rev 75597)
@@ -230,6 +230,27 @@
def help_adduser(self):
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):
args = filter(None, arg.split(' '))
Modified: Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/__init__.py
===================================================================
--- Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/__init__.py 2007-05-07 00:41:00 UTC (rev 75596)
+++ Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/__init__.py 2007-05-07 01:35:46 UTC (rev 75597)
@@ -18,5 +18,10 @@
$Id$
"""
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
+
Modified: Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/app/__init__.py
===================================================================
--- Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/app/__init__.py 2007-05-07 00:41:00 UTC (rev 75596)
+++ Zope/branches/tseaver-instlib_as_site_dir/lib/python/zope/app/__init__.py 2007-05-07 01:35:46 UTC (rev 75597)
@@ -15,4 +15,9 @@
$Id$
"""
-
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
More information about the Zope-Checkins
mailing list