Changeset 14151 for trunk


Ignore:
Timestamp:
04/24/12 10:56:56 (12 years ago)
Author:
sil
Message:
  • Made a 'bin'- and 'etc'-directory and moved the CMT commandline-script and its config-files to these directories.
  • Modified setup.py to copy some files to /usr/local/bin and /etc/cmt (for now)
  • Hardcoded some references to config-files (for the time being)

See #11

Location:
trunk/sara_cmt
Files:
1 deleted
3 edited
1 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt

    • Property svn:ignore
      •  

        old new  
        33CMT.egg-info
        44MANIFEST
         5CMT-*
  • trunk/sara_cmt/MANIFEST.in

    r14150 r14151  
    11#include AUTHORS
    22##include cmt.py
    3 ##recursive-include config *
    4 #include config/cmt.cfg
    5 #include sara_cmt/logging.conf
     3recursive-include etc *
     4#include config/cmt.conf
     5include sara_cmt/logging.conf
    66#include sara_cmt/apache/django.wsgi
    7 ##recursive-include templates/examples header *.cmt
     7recursive-include templates/examples header *.cmt
    88#exclude sara_cmt/settings_db.py
  • trunk/sara_cmt/bin/cmt.py

    r14149 r14151  
    1 #!/usr/bin/python
     1#!/usr/bin/env python
    22
    33#####
     
    4949#####
    5050#
    51 # <Decorators>
     51# <Decorators/etc/cmt/>
    5252#
    5353
     
    7979
    8080# Instantiate ConfigParser
    81 configfile = os.path.join(settings.PROJECT_BASE, 'config/cmt.cfg')
     81configfile = os.path.join(settings.PROJECT_BASE, '/etc/cmt/cmt.conf')
    8282config_parser = ConfigParser.ConfigParser()
    8383config_parser.optionxform = lambda x: x
  • trunk/sara_cmt/setup.py

    r14150 r14151  
    88    author = 'Sil Westerveld',
    99    author_email = 'sil.westerveld@sara.nl',
     10    #maintainer = 'Sil Westerveld',
     11    #maintainer_email = 'sil.westerveld@sara.nl',
    1012    license = 'GPL',
    1113    #long_description = open('README').read(),
     
    4446#
    4547#    py_modules = ['mod1', 'pkg.mod2'],
    46     py_modules = ['cmt'],
     48    py_modules = ['bin.cmt'],
    4749
    4850# http://docs.python.org/distutils/setupscript.html#relationships-between-distributions-and-packages
    4951# Dependencies on other Python modules and packages can be specified by supplying the requires keyword argument to setup(). The value must be a list of strings. Each string specifies a package that is required, and optionally what versions are sufficient.
    5052#
     53    #
     54    # Somehow 'requires' doesn't work; dependencies won't be installed
    5155    #requires = [
    5256    #    'Django (>=1.2)',
     
    6569        'Python>=2.6'
    6670    ],
    67     #provides
    68     #obsoletes
     71    #provides =
     72    #obsoletes =
    6973
    7074    # http://docs.python.org/distutils/setupscript.html#installing-scripts
     
    7579    # http://docs.python.org/distutils/setupscript.html#installing-package-data
    7680    # Often, additional files need to be installed into a package. These files are often data that's closely related to the package's implementation, or text files containing documentation that might be of interest to programmers using the package. These files are called package data.
    77     #package_data = {'': ['cmt', 'cmt.py'],},
    7881    #package_dir = {'sara_cmt': 'sara_cmt'},
    7982    #package_data = {'sara_cmt': ['sara_cmt/apache/django.wsgi']},
    8083
    81     #data_files = ['sara_cmt/sara_cmt/templates/examples/header', 'sara_cmt/sara_cmt/templates/examples/cnames.cmt']
     84    # http://docs.python.org/distutils/setupscript.html#installing-additional-files
     85    # The data_files option can be used to specify additional files needed by the module distribution: configuration files, message catalogs, data files, anything which doesn't fit in the previous categories.
     86    # data_files specifies a sequence of (directory, files) pairs in the following way:
     87    #     data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']),
     88    #             ('/etc/init.d', ['init-script'])]
     89    data_files = [
     90        ('/etc/cmt/', ['etc/cmt.conf']),
     91        ('/etc/cmt/templates/examples', ['templates/examples/*']),
     92        ('/usr/local/bin/', ['bin/cmt.py']),
     93    ]
    8294)
    83 #setup(
    84 #    #maintainer = ''
    85 #    #maintainer_email = ''
    86 #
    87 #    data_files = [('config', ['config/cmt.cfg'])],
    88 #)
Note: See TracChangeset for help on using the changeset viewer.