Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /FWCore/Skeletons/scripts/mkdatapkg is written in an unsupported language. File is not indexed.

0001 #!/usr/bin/env python3
0002 #-*- coding: utf-8 -*-
0003 #pylint: disable-msg=
0004 """
0005 File       : mkdatapkg
0006 Author     : Valentin Kuznetsov <vkuznet@gmail.com>
0007 Description: mkdatapkg code
0008 """
0009 
0010 # system modules
0011 import sys
0012 
0013 if  sys.version_info < (2, 6):
0014     raise Exception("This script requires python 2.6 or greater")
0015 
0016 # package modules
0017 from FWCore.Skeletons.cms import generate, config
0018 
0019 def pkg_help():
0020     "mkdatapkg help function"
0021     msg  = '\nmkdatapkg script generates CMS DataPkg code'
0022     msg += '\nUsage  : mkdatapkg MyDataPkg -author "FirstName LastName"'
0023     msg += '\nOutput : '
0024     msg += """
0025         MyDataPkg/
0026         |-- BuildFile.xml
0027         |  src/
0028         |  |-- classes.h
0029         |  |-- classes_def.xml
0030         |  interface/
0031         |  test/
0032         |  doc/
0033         """
0034     msg += '\nExample:'
0035     msg += '\n        # create new DataPkg code'
0036     msg += '\n        mkdatapkg MyDataPkg'
0037     msg += '\n        # create new DataPkg code with given author'
0038     msg += '\n        mkdatapkg MyDataPkg -author "First Last"'
0039     msg += '\n'
0040     return msg
0041 
0042 if __name__ == '__main__':
0043     generate(config('DataPkg', pkg_help()))