Ignore:
Timestamp:
9 Aug 2015, 22:02:16 (9 years ago)
Author:
uli
Message:

Set some important base values as consts.

These are likely to be modified in other packages and easier to spot now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/scripts.py

    r13190 r13191  
    1818
    1919
     20#: Packages that have to be 'grokked' in order to register exporters
     21#: and everything else.
     22#: The order of these packages is usually relevant.
     23TO_BE_GROKKED = ("waeup.kofa", "kofacustom.nigeria", "waeup.uniben")
     24
     25#: The data root from where we can look out for Data.fs, etc.
     26#: We usually expect a `var/` directory in this root.
     27INSTANCE_HOME = os.path.dirname(os.path.dirname(os.path.dirname(
     28    os.path.dirname(__file__))))
     29
    2030
    2131def grok_bases():
    2232    """Grok packages not already grokked.
    2333    """
    24     for pkg_name in ("waeup.kofa", "kofacustom.nigeria", "waeup.uniben"):
     34    for pkg_name in TO_BE_GROKKED:
    2535        if grokked.get(pkg_name, False):
    2636            continue
     
    4252    # https://github.com/zopefoundation/ZODB/blob/master/src/ZODB/cross-database-references.txt
    4353    databases = {}
    44     root_dir = os.path.dirname(os.path.dirname(os.path.dirname(
    45         os.path.dirname(__file__))))
     54    root_dir = INSTANCE_HOME
    4655    db_dir = os.path.join(root_dir, 'var', 'filestorage')
    4756    blob_dir = os.path.join(root_dir, 'var', 'blobstorage')
Note: See TracChangeset for help on using the changeset viewer.