Changeset 14154 for trunk


Ignore:
Timestamp:
04/25/12 17:03:14 (12 years ago)
Author:
sil
Message:

See #11

  • Narrowed down number of Django-versions as a dependency
  • Changed targets of docs, config-, data-, and executable-files to install
  • Now installable in a virtual environment
Location:
trunk/sara_cmt
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/MANIFEST.in

    r14153 r14154  
     1# Client only:
    12include AUTHORS CHANGES README
    23include bin/cmt
    3 recursive-include etc *
    4 #include sara_cmt/apache/django.wsgi
     4recursive-include etc *.conf
     5#include templates/
    56recursive-include templates/examples header *.cmt
    67#exclude sara_cmt/settings_db.py # only comment out during testing
     8
     9# Server only:
     10#include sara_cmt/apache/django.wsgi
  • trunk/sara_cmt/bin/cmt

    r14153 r14154  
    7979
    8080# Instantiate ConfigParser
    81 #TODO: make this dynamic
    82 configfile = '/etc/cmt/cmt.conf'
     81#TODO: think about a (better) way to make this dynamic:
     82import site
     83configfile = '%s/etc/cmt/cmt.conf' % site.sys.prefix
    8384config_parser = ConfigParser.ConfigParser()
    8485config_parser.optionxform = lambda x: x
  • trunk/sara_cmt/sara_cmt/logger.py

    r14153 r14154  
    11import logging
    22import logging.config
    3 import os
    43
    54
     
    1413    # Check for existence of a global logging object, otherwise make one
    1514    if 'logger' not in __shared_state.keys():
    16         #TODO: make this dynamic
    17         logging.config.fileConfig('/etc/cmt/logging.conf')
     15        #TODO: think about a (better) way to make this dynamic:
     16        import site
     17        logging.config.fileConfig('%s/etc/cmt/logging.conf'%site.sys.prefix)
    1818        __shared_state['logger'] = logging.getLogger('cli')
    1919
  • trunk/sara_cmt/sara_cmt/settings.py

    r14153 r14154  
    156156# Templates for the CMT command line interface.
    157157# (thus, the templates for our configfiles, etc)
    158 CMT_TEMPLATES_DIR = '/etc/sara_cmt/templates'
     158#TODO: think about a (better) way to make this dynamic:
     159#TODO: get this out of the settings.py, since it should be in the client config
     160import site
     161CMT_TEMPLATES_DIR = '%s/etc/templates' % site.sys.prefix
    159162
    160163# Templates for the CMT web-frontend.
  • trunk/sara_cmt/setup.py

    r14153 r14154  
    6262    #],
    6363    install_requires = [
    64         'Django>=1.2',
     64        'Django>=1.2, <1.3',
    6565        'IPy>=0.75',
    6666        'django_extensions>=0.4',
     
    7575    #
    7676    #scripts = ['sara_cmt/cmt.py'],
    77     #scripts = ['cmt', 'cmt.py'],
     77    scripts = ['bin/cmt'],
    7878
    7979    # http://docs.python.org/distutils/setupscript.html#installing-package-data
     
    9090    # NOTE: wildcards aren't accepted here
    9191    data_files = [
    92         ('/etc/cmt/', [
     92        # config-files
     93        ('etc/cmt/', [
    9394            'etc/cmt.conf',
    9495            'etc/logging.conf'
    9596        ]),
    96         ('/etc/cmt/templates', [
     97        ('etc/cmt/templates', []),
     98        # examples of CMT-templates
     99        ('share/doc/cmt/templates/examples', [
    97100            'templates/examples/base_allnodes.cmt',
    98101            'templates/examples/cnames.cmt',
     
    102105            'templates/examples/lisa_allnodes.cmt'
    103106        ]),
    104         ('/usr/local/bin/', ['bin/cmt']),
     107        # executable
     108        ('bin/', ['bin/cmt']),
    105109    ]
    106110)
Note: See TracChangeset for help on using the changeset viewer.