[Checkins] SVN: lovely.rating/trunk/ Use zope.container instead of zope.app.container
Nikolay Kim
fafhrd91 at gmail.com
Fri Dec 11 02:05:13 EST 2009
Log message for revision 106422:
Use zope.container instead of zope.app.container
Changed:
U lovely.rating/trunk/CHANGES.txt
U lovely.rating/trunk/bootstrap.py
U lovely.rating/trunk/setup.py
U lovely.rating/trunk/src/lovely/rating/definition.py
U lovely.rating/trunk/src/lovely/rating/generations/evolve1.py
U lovely.rating/trunk/src/lovely/rating/generations/helper.py
U lovely.rating/trunk/src/lovely/rating/interfaces.py
U lovely.rating/trunk/src/lovely/rating/manager.py
U lovely.rating/trunk/src/lovely/rating/rating.py
U lovely.rating/trunk/src/lovely/rating/scoresystem.py
-=-
Modified: lovely.rating/trunk/CHANGES.txt
===================================================================
--- lovely.rating/trunk/CHANGES.txt 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/CHANGES.txt 2009-12-11 07:05:13 UTC (rev 106422)
@@ -2,6 +2,12 @@
Changes for lovely.rating package
===================================
+0.4.0 (Unreleased)
+------------------
+
+- Use zope.container instead of zope.app.container
+
+
2007/09/10 0.3.2
================
Modified: lovely.rating/trunk/bootstrap.py
===================================================================
--- lovely.rating/trunk/bootstrap.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/bootstrap.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2006 Zope Corporation and Contributors.
+# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -24,27 +24,52 @@
tmpeggs = tempfile.mkdtemp()
-ez = {}
-exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
- ).read() in ez
-ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+is_jython = sys.platform.startswith('java')
-import pkg_resources
+try:
+ import pkg_resources
+except ImportError:
+ ez = {}
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
-cmd = 'from setuptools.command.easy_install import main; main()'
+ import pkg_resources
+
if sys.platform == 'win32':
- cmd = '"%s"' % cmd # work around spawn lamosity on windows
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ def quote (c):
+ return c
-ws = pkg_resources.working_set
-assert os.spawnle(
- os.P_WAIT, sys.executable, sys.executable,
- '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
- dict(os.environ,
- PYTHONPATH=
- ws.find(pkg_resources.Requirement.parse('setuptools')).location
- ),
- ) == 0
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws = pkg_resources.working_set
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+ quote(tmpeggs), 'zc.buildout'],
+ env=dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ).wait() == 0
+
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, quote (sys.executable),
+ '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
ws.add_entry(tmpeggs)
ws.require('zc.buildout')
import zc.buildout.buildout
Modified: lovely.rating/trunk/setup.py
===================================================================
--- lovely.rating/trunk/setup.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/setup.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -2,7 +2,7 @@
from setuptools import setup, find_packages
setup(name='lovely.rating',
- version='0.3.2',
+ version='0',
author = "Lovelysystems",
author_email = "office at lovelysystems.com",
description = "A rating engine for zope 3",
@@ -19,7 +19,7 @@
install_requires = ['setuptools',
'ZODB3',
'pytz',
- 'zope.app.container',
+ 'zope.container',
'zope.app.generations',
'zope.app.zopeappgenerations',
'zope.component',
Modified: lovely.rating/trunk/src/lovely/rating/definition.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/definition.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/definition.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -19,10 +19,11 @@
import persistent
import zope.interface
from zope.schema import fieldproperty
-from zope.app.container import contained
+from zope.container import contained
from lovely.rating import IRatingDefinition
+
class RatingDefinition(contained.Contained, persistent.Persistent):
zope.interface.implements(IRatingDefinition)
Modified: lovely.rating/trunk/src/lovely/rating/generations/evolve1.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/generations/evolve1.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/generations/evolve1.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -12,4 +12,3 @@
if rating._timestamp.tzinfo is None:
rating._timestamp = rating._timestamp.replace(
tzinfo=UTC)
-
Modified: lovely.rating/trunk/src/lovely/rating/generations/helper.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/generations/helper.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/generations/helper.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -36,4 +36,3 @@
new = SimpleScoreSystem(
old.__name__, old.title, old.description, old.scores)
definition.scoreSystem = new
-
Modified: lovely.rating/trunk/src/lovely/rating/interfaces.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/interfaces.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/interfaces.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -220,4 +220,3 @@
class RatingRemovedEvent(RatingEvent):
"""A rating was removed from an object"""
zope.interface.implements(IRatingRemovedEvent)
-
Modified: lovely.rating/trunk/src/lovely/rating/manager.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/manager.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/manager.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -27,7 +27,7 @@
from BTrees import OOBTree
-from zope.app.container import contained
+from zope.container import contained
from lovely.rating import IRatable, IRatingsManager, IRatingDefinition, rating
Modified: lovely.rating/trunk/src/lovely/rating/rating.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/rating.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/rating.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -19,7 +19,7 @@
import datetime
import persistent
import zope.interface
-from zope.app.container import contained
+from zope.container import contained
from lovely.rating import IRating
from pytz import UTC
@@ -46,4 +46,3 @@
return cmp(super(Rating, self), other)
return cmp((self.id, self.value, self.user),
(other.id, other.value, other.user))
-
Modified: lovely.rating/trunk/src/lovely/rating/scoresystem.py
===================================================================
--- lovely.rating/trunk/src/lovely/rating/scoresystem.py 2009-12-11 06:48:32 UTC (rev 106421)
+++ lovely.rating/trunk/src/lovely/rating/scoresystem.py 2009-12-11 07:05:13 UTC (rev 106422)
@@ -38,4 +38,3 @@
def __reduce__(self):
return self.__name__
-
More information about the checkins
mailing list