Changeset 5071


Ignore:
Timestamp:
06/03/09 10:17:27 (10 years ago)
Author:
spascoe
Message:

Put default ini files in the package hierarchy. NAPPY_BASE_DIR is still
used if set.

Location:
nappy/branches/nappy-eggable
Files:
1 added
1 deleted
2 edited
3 moved

Legend:

Unmodified
Added
Removed
  • nappy/branches/nappy-eggable/nappy/utils/parse_config.py

    r5068 r5071  
    1111import os 
    1212 
    13 _here = os.path.dirname(__file__) 
    1413 
    1514# Global variables 
    16 base_dir = os.environ.get("NAPPY_BASE_DIR", os.path.join(_here, '..')) 
     15 
     16# base_dir is taken from the environment first and then from nappy.config 
     17# as a fallback. 
     18if 'NAPPY_BASE_DIR' in os.environ: 
     19    base_dir = os.environ["NAPPY_BASE_DIR"] 
     20else: 
     21    _here = os.path.dirname(__file__) 
     22    base_dir = os.path.join(_here, '../config') 
     23 
    1724config_file = os.path.join(base_dir, "nappy.ini") 
    1825config_dict = None 
  • nappy/branches/nappy-eggable/setup.py

    r5070 r5071  
    2020      #classifiers = [], 
    2121 
     22      # We make the package non-zip_safe so that we don't need to 
     23      # change the way ini files are read too much. 
    2224      packages = find_packages(), 
    2325      include_package_data = True, 
     26      zip_safe = False, 
    2427 
    2528      tests_require = ['nose'], 
Note: See TracChangeset for help on using the changeset viewer.