From: Stefan H. H. <svn...@pl...> - 2008-11-27 14:53:15
|
Author: shh42 Date: Thu Nov 27 14:53:09 2008 New Revision: 76502 Modified: Products.PloneTestCase/trunk/CHANGES.txt Products.PloneTestCase/trunk/Products/PloneTestCase/PloneTestCase.py Products.PloneTestCase/trunk/Products/PloneTestCase/ptc.py Products.PloneTestCase/trunk/Products/PloneTestCase/setup.py Log: Reverted r76500 as getFSVersionTuple has been removed on trunk. Oh well. ;-) Modified: Products.PloneTestCase/trunk/CHANGES.txt ============================================================================== --- Products.PloneTestCase/trunk/CHANGES.txt (original) +++ Products.PloneTestCase/trunk/CHANGES.txt Thu Nov 27 14:53:09 2008 @@ -4,14 +4,14 @@ 0.9.8b5 - unreleased -------------------- -- Use getFSVersionTuple to determine the Plone version instead of trying - to import migrations. - [stefan] - - Adjusted _createHomeFolder to create the 'Members' folder if it isn't created by the site creation code. [hannosch] +- Adjusted PLONE40 check after the migrations have been moved out of the + CMFPlone package. + [hannosch] + 0.9.8b4 - 2008-10-26 -------------------- Modified: Products.PloneTestCase/trunk/Products/PloneTestCase/PloneTestCase.py ============================================================================== --- Products.PloneTestCase/trunk/Products/PloneTestCase/PloneTestCase.py (original) +++ Products.PloneTestCase/trunk/Products/PloneTestCase/PloneTestCase.py Thu Nov 27 14:53:09 2008 @@ -23,7 +23,6 @@ from setup import PLONE31 from setup import PLONE32 from setup import PLONE40 -from setup import PLONEVERSION from setup import USELAYER from setup import Z3INTERFACES from setup import portal_name Modified: Products.PloneTestCase/trunk/Products/PloneTestCase/ptc.py ============================================================================== --- Products.PloneTestCase/trunk/Products/PloneTestCase/ptc.py (original) +++ Products.PloneTestCase/trunk/Products/PloneTestCase/ptc.py Thu Nov 27 14:53:09 2008 @@ -26,7 +26,6 @@ from Products.PloneTestCase.setup import PLONE31 from Products.PloneTestCase.setup import PLONE32 from Products.PloneTestCase.setup import PLONE40 -from Products.PloneTestCase.setup import PLONEVERSION from Products.PloneTestCase.setup import USELAYER from Products.PloneTestCase.setup import Z3INTERFACES from Products.PloneTestCase.setup import portal_name Modified: Products.PloneTestCase/trunk/Products/PloneTestCase/setup.py ============================================================================== --- Products.PloneTestCase/trunk/Products/PloneTestCase/setup.py (original) +++ Products.PloneTestCase/trunk/Products/PloneTestCase/setup.py Thu Nov 27 14:53:09 2008 @@ -19,27 +19,68 @@ ZopeTestCase.installProduct('ZCTextIndex', quiet=1) ZopeTestCase.installProduct('CMFPlone', quiet=1) -# Check Plone version -PLONE21 = PLONE25 = PLONE30 = PLONE31 = PLONE32 = PLONE40 = False +# Check for Plone 2.1 or above +try: + from Products.CMFPlone.migrations import v2_1 +except ImportError: + PLONE21 = 0 +else: + PLONE21 = 1 + +# Check for Plone 2.5 or above +try: + from Products.CMFPlone.migrations import v2_5 +except ImportError: + PLONE25 = 0 +else: + PLONE25 = 1 + PLONE21 = 1 + +# Check for Plone 3.0 or above +try: + from Products.CMFPlone.migrations import v3_0 +except ImportError: + PLONE30 = 0 +else: + PLONE30 = 1 + PLONE25 = 1 + PLONE21 = 1 + +# Check for Plone 3.1 or above +try: + from Products.CMFPlone.migrations import v3_1 +except ImportError: + PLONE31 = 0 +else: + PLONE31 = 1 + PLONE30 = 1 + PLONE25 = 1 + PLONE21 = 1 + +# Check for Plone 3.2 or above +try: + from Products.CMFPlone.migrations import v3_2 +except ImportError: + PLONE32 = 0 +else: + PLONE32 = 1 + PLONE31 = 1 + PLONE30 = 1 + PLONE25 = 1 + PLONE21 = 1 +# Check for Plone 4.0 or above try: - from Products.CMFPlone.utils import getFSVersionTuple + from plone.app.upgrade import v40 except ImportError: - PLONEVERSION = (2, 0) + PLONE40 = 0 else: - PLONEVERSION = getFSVersionTuple()[:2] - if PLONEVERSION >= (2, 1): - PLONE21 = True - if PLONEVERSION >= (2, 5): - PLONE25 = True - if PLONEVERSION >= (3, 0): - PLONE30 = True - if PLONEVERSION >= (3, 1): - PLONE31 = True - if PLONEVERSION >= (3, 2): - PLONE32 = True - if PLONEVERSION >= (4, 0): - PLONE40 = True + PLONE40 = 1 + PLONE32 = 1 + PLONE31 = 1 + PLONE30 = 1 + PLONE25 = 1 + PLONE21 = 1 if PLONE21: ZopeTestCase.installProduct('Archetypes', quiet=1) |