Make it backward compatible with older quixote releases

* wcs/__init__.py:
 * wcs/admin/__init__.py:
 * wcs/backoffice/__init__.py:
 * wcs/forms/__init__.py:
 * wcs/qommon/__init__.py:
 * wcs/qommon/admin/__init__.py:
 * wcs/qommon/backoffice/__init__.py:
 * wcs/qommon/ident/__init__.py:
   if compile_package is not present, revert to previous way of doing
   (calling enable_ptl()).
This commit is contained in:
Benjamin Dauvergne 2009-04-03 14:03:08 +00:00
parent 0ce8dde656
commit 6b4e45a502
8 changed files with 41 additions and 17 deletions

View File

@ -2,8 +2,11 @@ import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass
import qommon

View File

@ -1,4 +1,7 @@
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass
from root import RootDirectory

View File

@ -1,4 +1,7 @@
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass
from root import RootDirectory

View File

@ -1,2 +1,5 @@
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass

View File

@ -1,9 +1,12 @@
from quixote.ptl import compile_package
compile_package(__path__)
from quixote import enable_ptl, get_publisher
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
enable_ptl()
import __builtin__
from quixote import enable_ptl, get_publisher
from publisher import get_cfg, get_logger

View File

@ -1,2 +1,5 @@
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass

View File

@ -1,2 +1,5 @@
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass

View File

@ -1,5 +1,8 @@
from quixote.ptl import compile_package
compile_package(__path__)
try:
from quixote.ptl import compile_package
compile_package(__path__)
except ImportError:
pass
from quixote import get_publisher
import base