setup.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import os,os.path
00004 import sys
00005 import string
00006 import commands
00007 import glob
00008 from distutils import core
00009 from distutils import cmd
00010 from distutils import log
00011 from distutils import util
00012 from distutils import dir_util
00013 from distutils import errors
00014 from distutils import version
00015 from distutils.command.build import build
00016 from distutils.command.sdist import sdist
00017 from distutils.command.install import install
00018 from distutils.command.install_data import install_data
00019 
00020 
00021 core.DEBUG = False
00022 
00023 g_os = None
00024 g_qkc_option = "-u"
00025 is_examples = False
00026 
00027 if os.sep == '/':
00028   g_os = "unix"
00029   if sys.version_info[0:3] >= (2, 6, 0):
00030     example_sitedir = os.path.join("share", "OpenRTM-aist", "examples", "python")
00031   elif sys.version_info[0:3] >= (2, 2, 0):
00032     example_sitedir = os.path.join("share", "OpenRTM-aist", "examples", "python")
00033 elif os.sep == ':':
00034   example_sitedir = os.path.join("lib", "site-packages")
00035 elif os.sep == '\\':
00036   print "os: win32"
00037   g_os = "win32"
00038   example_sitedir = os.path.join("lib", "site-packages")
00039 else:
00040   if sys.version_info[0:3] >= (2, 2, 0):
00041     example_sitedir = os.path.join("lib", "site-packages")
00042   else:
00043     example_sitedir = os.path.join("lib", "site-packages")
00044 
00045 def compile_idl(cmd, pars, files):
00046   """
00047   Put together command line for python stubs generation.
00048   """
00049   global g_os
00050   cmdline = cmd +' '+ string.join(pars) +' '+string.join(files)
00051   if g_os == "win32":
00052     os.system(cmdline)
00053     return
00054 
00055   log.info(cmdline)
00056   status, output = commands.getstatusoutput(cmdline)
00057   log.info(output)
00058   if status != 0:
00059     raise errors.DistutilsExecError("Return status of %s is %d" %
00060             (cmd, status))
00061 
00062 
00063 def gen_idl_name(dir, name):
00064   """
00065   Generate name of idl file from directory prefix and IDL module name.
00066   """
00067   full_name = '"'+os.path.join(dir, name + ".idl")+'"'
00068   return full_name
00069 
00070 
00071 class Build_idl (cmd.Command):
00072   """
00073   This class realizes a subcommand of build command and is used for building
00074   IDL stubs.
00075   """
00076 
00077   description = "Generate python stubs from IDL files"
00078 
00079   user_options = [("omniidl=", "i", "omniidl program used to build stubs"),
00080                   ("idldir=",  "d", "directory where IDL files reside")]
00081 
00082   def initialize_options(self):
00083     self.idldir  = None
00084     self.omniidl = None
00085     self.omniidl_params = ["-bpython"]
00086 
00087   def finalize_options(self):
00088     if not self.omniidl:
00089       self.omniidl = "omniidl"
00090     if not self.idldir:
00091       self.idldir = os.path.join(os.getcwd(),"OpenRTM_aist","RTM_IDL")
00092 
00093   def run(self):
00094     #self.omniidl_params.append("-Wbpackage=OpenRTM_aist.RTM_IDL")
00095     self.omniidl_params.append("-COpenRTM_aist/RTM_IDL")
00096     self.omniidl_params.append("-IOpenRTM_aist/RTM_IDL")
00097     modules = ["BasicDataType", "DataPort", "ExtendedDataTypes",
00098                "InterfaceDataTypes", "Manager", "OpenRTM", "RTC",
00099                "SDOPackage"]
00100     util.execute(compile_idl,
00101                  (self.omniidl, self.omniidl_params,
00102                   [ gen_idl_name(self.idldir, module) for module in modules ]),
00103                  "Generating python stubs from IDL files")
00104 
00105     # for SimpleService
00106     self.idldir = os.path.join(os.getcwd(),"OpenRTM_aist","examples","SimpleService")
00107     self.omniidl_params[-2]=("-COpenRTM_aist/examples/SimpleService")
00108     self.omniidl_params[-1]=("-IOpenRTM_aist/examples/SimpleService")
00109     modules = ["MyService"]
00110     util.execute(compile_idl,
00111                  (self.omniidl, self.omniidl_params,
00112                   [ gen_idl_name(self.idldir, module) for module in modules ]),
00113                  "Generating python sample stubs from IDL files")
00114 
00115     # for AutoTest
00116     self.idldir = os.path.join(os.getcwd(),"OpenRTM_aist","examples","AutoTest")
00117     self.omniidl_params[-2]=("-COpenRTM_aist/examples/AutoTest")
00118     self.omniidl_params[-1]=("-IOpenRTM_aist/examples/AutoTest")
00119     modules = ["AutoTestService"]
00120     util.execute(compile_idl,
00121                  (self.omniidl, self.omniidl_params,
00122                   [ gen_idl_name(self.idldir, module) for module in modules ]),
00123                  "Generating python sample stubs from IDL files")
00124 
00125 
00126 class Build_examples_idl (cmd.Command):
00127   """
00128   This class realizes a subcommand of build command and is used for building
00129   IDL stubs.
00130   """
00131 
00132   description = "Generate python stubs from IDL files in examples"
00133 
00134   user_options = [("omniidl=", "i", "omniidl program used to build stubs"),
00135                   ("idldir=",  "d", "directory where IDL files reside")]
00136 
00137   def initialize_options(self):
00138     self.idldir  = None
00139     self.omniidl = None
00140     self.omniidl_params = ["-bpython"]
00141 
00142   def finalize_options(self):
00143     if not self.omniidl:
00144       self.omniidl = "omniidl"
00145     if not self.idldir:
00146       self.idldir = os.path.join(os.getcwd(),"OpenRTM_aist","examples","SimpleService")
00147 
00148   def run(self):
00149     #self.omniidl_params.append("-Wbpackage=OpenRTM_aist.RTM_IDL")
00150     self.omniidl_params.append("-COpenRTM_aist/examples/SimpleService")
00151     self.omniidl_params.append("-IOpenRTM_aist/examples/SimpleService")
00152     modules = ["MyService"]
00153 
00154     util.execute(compile_idl,
00155                  (self.omniidl, self.omniidl_params,
00156                   [ gen_idl_name(self.idldir, module) for module in modules ]),
00157                  "Generating python sample stubs from IDL files")
00158 
00159 
00160 class Build_doc(cmd.Command):
00161   """
00162   This class realizes a subcommand of build command and is used for building
00163   document by doxygen.
00164   """
00165 
00166   description = "Generate document by doxygen"
00167 
00168   def initialize_options(self):
00169     pass
00170 
00171   def finalize_options(self):
00172     pass
00173 
00174   def run(self):
00175     global g_os
00176     global is_examples
00177 
00178     if g_os == "unix" and not is_examples:
00179       curr_dir = os.getcwd()
00180       docs_dir = os.path.join(os.getcwd(), 'OpenRTM_aist', 'docs')
00181       os.chdir(docs_dir)
00182       os.system("make")
00183       os.chdir(curr_dir)
00184 
00185 
00186 class Build_examples (build):
00187   """
00188   This is here just to override default sub_commands list of build class.
00189   We added 'build_examples_idl' item.
00190   """
00191   def has_pure_modules (self):
00192     return self.distribution.has_pure_modules()
00193 
00194   def has_c_libraries (self):
00195     return self.distribution.has_c_libraries()
00196 
00197   def has_ext_modules (self):
00198     return self.distribution.has_ext_modules()
00199 
00200   def has_scripts (self):
00201     return self.distribution.has_scripts()
00202 
00203   def has_idl_files (self):
00204     return True
00205 
00206   sub_commands = [('build_examples_idl', has_idl_files),
00207                   ('build_py',           has_pure_modules),
00208                   ('build_clib',         has_c_libraries),
00209                   ('build_ext',          has_ext_modules),
00210                   ('build_scripts',      has_scripts)]
00211 
00212 
00213 class Build (build):
00214   """
00215   This is here just to override default sub_commands list of build class.
00216   We added 'build_idl' item.
00217   """
00218   def has_pure_modules (self):
00219     return self.distribution.has_pure_modules()
00220 
00221   def has_c_libraries (self):
00222     return self.distribution.has_c_libraries()
00223 
00224   def has_ext_modules (self):
00225     return self.distribution.has_ext_modules()
00226 
00227   def has_scripts (self):
00228     return self.distribution.has_scripts()
00229 
00230   def has_idl_files (self):
00231     return True
00232 
00233   def has_doc_files (self):
00234     return True
00235 
00236   sub_commands = [('build_doc',     has_doc_files),
00237                   ('build_idl',     has_idl_files),
00238                   ('build_py',      has_pure_modules),
00239                   ('build_clib',    has_c_libraries),
00240                   ('build_ext',     has_ext_modules),
00241                   ('build_scripts', has_scripts)]
00242 
00243 
00244 class OtherSetupForSdist(sdist):
00245 
00246   def initialize_options(self):
00247     global is_examples
00248 
00249     sdist.initialize_options(self)
00250     if is_examples:
00251       self.template = "MANIFEST_examples.in"
00252       self.use_defaults = 0
00253       self.force_manifest = 1
00254       stub_dirs = ["SimpleService","SimpleService__POA"]
00255 
00256       for dir_ in stub_dirs:
00257         if not os.path.isdir(os.path.join(os.getcwd(),"OpenRTM_aist","examples","SimpleService",dir_)):
00258           os.mkdir(os.path.join(os.getcwd(),"OpenRTM_aist","examples","SimpleService",dir_))
00259     else:
00260       self.use_defaults = 0
00261       self.force_manifest = 1
00262       stub_dirs = ["OpenRTM","OpenRTM__POA",
00263                    "RTC","RTC__POA",
00264                    "RTM","RTM__POA",
00265                    "SDOPackage","SDOPackage__POA"]
00266 
00267       for dir_ in stub_dirs:
00268         if not os.path.isdir(os.path.join(os.getcwd(),"OpenRTM_aist","RTM_IDL",dir_)):
00269           os.mkdir(os.path.join(os.getcwd(),"OpenRTM_aist","RTM_IDL",dir_))
00270 
00271   def make_distribution (self):
00272     """Create the source distribution(s).  First, we create the release
00273     tree with 'make_release_tree()'; then, we create all required
00274     archive files (according to 'self.formats') from the release tree.
00275     Finally, we clean up by blowing away the release tree (unless
00276     'self.keep_temp' is true).  The list of archive files created is
00277     stored so it can be retrieved later by 'get_archive_files()'.
00278     """
00279     global g_os
00280     global g_qkc_option
00281 
00282     # Don't warn about missing meta-data here -- should be (and is!)
00283     # done elsewhere.
00284     base_dir = self.distribution.get_fullname()
00285     base_name = os.path.join(self.dist_dir, base_dir)
00286 
00287     self.make_release_tree(base_dir, self.filelist.files)
00288     archive_files = []              # remember names of files we create
00289 
00290     if g_os == "unix":
00291       curr_dir = os.getcwd()
00292       cmd_dir = os.path.join(os.getcwd(), pkg_name+'-'+pkg_version)
00293       os.chdir(cmd_dir)
00294       cmd_ = "find . -name \"*\" | xargs qkc %s" % g_qkc_option
00295       os.system(cmd_)
00296       os.chdir(curr_dir)
00297           
00298     for fmt in self.formats:
00299       file = self.make_archive(base_name, fmt, base_dir=base_dir)
00300       archive_files.append(file)
00301       self.distribution.dist_files.append(('sdist', '', file))
00302 
00303     self.archive_files = archive_files
00304 
00305     if not self.keep_temp:
00306       dir_util.remove_tree(base_dir, dry_run=self.dry_run)
00307 
00308 
00309 install_data_dir = None
00310 
00311 class Install(install):
00312   def run(self):
00313     global install_data_dir
00314     install_data_dir = self.install_purelib
00315     install.run(self)
00316 
00317 class InstallData(install_data):
00318   def run(self):
00319     global install_data_dir
00320     for i in range(len(self.data_files)):
00321       dir = os.path.join(install_data_dir,self.data_files[i][0])
00322       self.data_files[i] = (dir,self.data_files[i][1])
00323     install_data.run(self)
00324 
00325 
00326 ############################### data for setup() ###########################################
00327 
00328 
00329 unix_packages = ["OpenRTM_aist",
00330                  "OpenRTM_aist.RTM_IDL",
00331                  "OpenRTM_aist.RTM_IDL.OpenRTM",
00332                  "OpenRTM_aist.RTM_IDL.OpenRTM__POA",
00333                  "OpenRTM_aist.RTM_IDL.RTC",
00334                  "OpenRTM_aist.RTM_IDL.RTC__POA",
00335                  "OpenRTM_aist.RTM_IDL.RTM",
00336                  "OpenRTM_aist.RTM_IDL.RTM__POA",
00337                  "OpenRTM_aist.RTM_IDL.SDOPackage",
00338                  "OpenRTM_aist.RTM_IDL.SDOPackage__POA",
00339                  "OpenRTM_aist.RTM_IDL.device_interfaces",
00340                  "OpenRTM_aist.ext",
00341                  "OpenRTM_aist.ext.sdo",
00342                  "OpenRTM_aist.ext.sdo.observer",
00343                  "OpenRTM_aist.utils",
00344                  "OpenRTM_aist.utils.rtcd",
00345                  "OpenRTM_aist.utils.rtcprof",
00346                  "OpenRTM_aist.utils.rtc-template",
00347                  "OpenRTM_aist.utils.rtm-naming"]
00348 
00349 example_dir = ["AutoControl",
00350                "Composite",
00351                "ConfigSample",
00352                "ExtTrigger",
00353                "MobileRobotCanvas",
00354                "NXTRTC",
00355                "SeqIO",
00356                "SimpleIO",
00357                {"SimpleService":["SimpleService","SimpleService__POA"]},
00358                "Slider_and_Motor",
00359                "TkLRFViewer",
00360                "TkJoyStick"]
00361 
00362 example_data_files = []
00363 
00364 simpleservice_path = glob.glob(os.path.join("OpenRTM_aist", "examples", "SimpleService"))[0]
00365 simpleservice_path += "/SimpleService/__init__.py"
00366 example_data_files.append((os.path.join(example_sitedir, "SimpleService", "SimpleService"),
00367                            [simpleservice_path]))
00368 
00369 simpleservice__poa_path = glob.glob(os.path.join("OpenRTM_aist", "examples", "SimpleService"))[0]
00370 simpleservice__poa_path += "/SimpleService__POA/__init__.py"
00371 example_data_files.append((os.path.join(example_sitedir, "SimpleService", "SimpleService__POA"),
00372                            [simpleservice__poa_path]))
00373 
00374 simpleservice_idl_path = glob.glob(os.path.join("OpenRTM_aist", "examples", "SimpleService"))[0]
00375 simpleservice_idl_path += "/MyService_idl.py"
00376 example_data_files.append((os.path.join(example_sitedir, "SimpleService"),
00377                            [simpleservice_idl_path]))
00378 
00379 for ex in example_dir:
00380   if isinstance(ex, str):
00381     py_path_   = glob.glob(os.path.join("OpenRTM_aist", "examples", ex, "*.py"))
00382     conf_path_ = glob.glob(os.path.join("OpenRTM_aist", "examples", ex, "*.conf")) 
00383     idl_path_  = glob.glob(os.path.join("OpenRTM_aist", "examples", ex, "*.idl")) 
00384     if py_path_:
00385       for pp_ in py_path_:
00386         example_data_files.append((os.path.join(example_sitedir, ex), [pp_]))
00387 
00388     if conf_path_:
00389       for cp_ in conf_path_:
00390         example_data_files.append((os.path.join(example_sitedir, ex), [cp_]))
00391 
00392     if idl_path_:
00393       for ip_ in idl_path_:
00394         example_data_files.append((os.path.join(example_sitedir, ex), [ip_]))
00395 
00396   elif isinstance(ex, dict):
00397     vals_ = ex.values()
00398     key_  = ex.keys()[0]
00399     if isinstance(vals_, list):
00400       if isinstance(vals_[0], list):
00401         for val_ in vals_[0]:
00402           stub_path_   = glob.glob(os.path.join("OpenRTM_aist", "examples",
00403                                                 key_, val_, "*.py"))
00404           if stub_path_:
00405             for sp_ in stub_path_:
00406               example_data_files.append((os.path.join(example_sitedir, key_, val_), [sp_]))
00407       elif isinstance(vals_[0], str):
00408         stub_path_   = glob.glob(os.path.join("OpenRTM_aist", "examples",
00409                                               key_, vals_[0], "*.py"))
00410         if stub_path_:
00411             for sp_ in stub_path_:
00412               example_data_files.append((os.path.join(example_sitedir, key_, vals_[0]), [sp_]))
00413 
00414     py_path_   = glob.glob(os.path.join("OpenRTM_aist", "examples", key_, "*.py"))
00415     conf_path_ = glob.glob(os.path.join("OpenRTM_aist", "examples", key_, "*.conf")) 
00416     idl_path_  = glob.glob(os.path.join("OpenRTM_aist", "examples", key_, "*.idl")) 
00417 
00418     if py_path_:
00419       for pp_ in py_path_:
00420         example_data_files.append((os.path.join(example_sitedir, key_), [pp_]))
00421     if conf_path_:
00422       for cp_ in conf_path_:
00423         example_data_files.append((os.path.join(example_sitedir, key_), [cp_]))
00424     if idl_path_:
00425       for ip_ in idl_path_:
00426         example_data_files.append((os.path.join(example_sitedir, key_), [ip_]))
00427 
00428 
00429 win32_packages = ["OpenRTM_aist",
00430                   "OpenRTM_aist.RTM_IDL",
00431                   "OpenRTM_aist.RTM_IDL.OpenRTM",
00432                   "OpenRTM_aist.RTM_IDL.OpenRTM__POA",
00433                   "OpenRTM_aist.RTM_IDL.RTC",
00434                   "OpenRTM_aist.RTM_IDL.RTC__POA",
00435                   "OpenRTM_aist.RTM_IDL.RTM",
00436                   "OpenRTM_aist.RTM_IDL.RTM__POA",
00437                   "OpenRTM_aist.RTM_IDL.SDOPackage",
00438                   "OpenRTM_aist.RTM_IDL.SDOPackage__POA",
00439                   "OpenRTM_aist.RTM_IDL.device_interfaces",
00440                   "OpenRTM_aist.examples.AutoControl",
00441                   "OpenRTM_aist.examples.Composite",
00442                   "OpenRTM_aist.examples.ConfigSample",
00443                   "OpenRTM_aist.examples.ExtTrigger",
00444                   "OpenRTM_aist.examples.MobileRobotCanvas",
00445                   "OpenRTM_aist.examples.NXTRTC",
00446                   "OpenRTM_aist.examples.SeqIO",
00447                   "OpenRTM_aist.examples.SimpleIO",
00448                   "OpenRTM_aist.examples.SimpleService",
00449                   "OpenRTM_aist.examples.Slider_and_Motor",
00450                   "OpenRTM_aist.examples.Templates",
00451                   "OpenRTM_aist.examples.TkJoyStick",
00452                   "OpenRTM_aist.examples.TkLRFViewer",
00453                   "OpenRTM_aist.ext",
00454                   "OpenRTM_aist.ext.sdo",
00455                   "OpenRTM_aist.ext.sdo.observer",
00456                   "OpenRTM_aist.utils",
00457                   "OpenRTM_aist.utils.rtcd",
00458                   "OpenRTM_aist.utils.rtcprof",
00459                   "OpenRTM_aist.utils.rtc-template",
00460                   "OpenRTM_aist.utils.rtm-naming"]
00461 
00462 unix_data_files = [("",['OpenRTM-aist.pth'])]
00463 
00464 idl_files= glob.glob(os.path.join('OpenRTM_aist',
00465                                   'RTM_IDL',
00466                                   '*.idl'))
00467 
00468 device_if_idl_files= glob.glob(os.path.join('OpenRTM_aist',
00469                                             'RTM_IDL',
00470                                             'device_interfaces',
00471                                             '*.idl'))
00472 
00473 unix_data_files.append((os.path.join('OpenRTM_aist', 'utils', 'rtcd'),
00474                         ['OpenRTM_aist/utils/rtcd/rtcd.conf']))
00475 unix_data_files.append((os.path.join('OpenRTM_aist', 'utils', 'rtcd'),
00476                         ['OpenRTM_aist/utils/rtcd/rtc.conf']))
00477 unix_data_files.append((os.path.join('OpenRTM_aist', 'ext', 'sdo', 'observer'),
00478                         ['OpenRTM_aist/ext/sdo/observer/rtc.conf']))
00479 
00480 for idl in idl_files:
00481   unix_data_files.append((os.path.join('OpenRTM_aist', 'RTM_IDL'),
00482                           [idl]))
00483 
00484 for device_idl in device_if_idl_files:
00485   unix_data_files.append((os.path.join('OpenRTM_aist', 'RTM_IDL',
00486                                        'device_interfaces'), [device_idl]))
00487 
00488 import copy
00489 win32_data_files = copy.deepcopy(unix_data_files)
00490 
00491 win32_data_files.append((os.path.join('OpenRTM_aist', 'examples'),
00492                          ['OpenRTM_aist/examples/rtc.conf.sample']))
00493 win32_data_files.append((os.path.join('OpenRTM_aist', 'examples'),
00494                          ['OpenRTM_aist/examples/component.conf']))
00495 win32_data_files.append((os.path.join('OpenRTM_aist', 'ext', 'sdo', 'observer'),
00496                          ['OpenRTM_aist/ext/sdo/observer/setup.bat']))
00497 
00498 unix_data_files.append((os.path.join('OpenRTM_aist', 'ext', 'sdo', 'observer'),
00499                         ['OpenRTM_aist/ext/sdo/observer/setup.sh']))
00500 
00501 templates_xml = glob.glob(os.path.join('OpenRTM_aist',
00502                                        'examples',
00503                                        'Templates',
00504                                        '*.xml'))
00505 
00506 for tmp_xml in templates_xml:
00507   win32_data_files.append((os.path.join('OpenRTM_aist', 'examples', 'Templates'),
00508                            [tmp_xml]))
00509 
00510 
00511 ##############################################################################################
00512 
00513 pkg_name      = "OpenRTM-aist-Python"
00514 pkg_version   = "1.1.0"
00515 pkg_desc      = "Python modules for OpenRTM-aist-1.1"
00516 pkg_author    = "Shinji Kurihara and Noriaki Ando"
00517 pkg_email     = "n-ando@aist.go.jp"
00518 pkg_url       = "http://www.openrtm.org/"
00519 pkg_long_desc = """\
00520 OpenRTM-aist is a reference implementation of RT-Middleware,
00521 which is now under standardization process in OMG (Object Management Group).
00522 OpenRTM-aist is being developed and distributed by
00523 Intelligent Systems Research Institute,
00524 National Institute of Advanced Industrial Science and Technology (AIST), Japan.
00525 Please see http://www.openrtm.org/ for more detail.
00526 """
00527 pkg_license   = "LGPL"
00528 
00529 examples_install = False
00530 
00531 cwd_ = os.getcwd()
00532 
00533 if cwd_.find("OpenRTM-aist-Python-example-1.1.0") != -1 or \
00534       cwd_.find("openrtm-aist-python-example-1.1.0") != -1:
00535 
00536   examples_install = True
00537 
00538 try:
00539   if g_os == "unix":
00540     g_qkc_option = "-u"
00541     # for RTM (sdist, build, install)
00542     if not examples_install:
00543       core.setup(name             = pkg_name,
00544                  version          = pkg_version,
00545                  description      = pkg_desc,
00546                  author           = pkg_author,
00547                  author_email     = pkg_email,
00548                  url              = pkg_url,
00549                  long_description = pkg_long_desc,
00550                  license          = pkg_license,
00551                  cmdclass         = { "build":Build, "build_idl":Build_idl, "build_doc":Build_doc,
00552                                       "sdist":OtherSetupForSdist, "install":Install, "install_data":InstallData },
00553                  packages         = unix_packages,
00554                  scripts= ['OpenRTM_aist/utils/rtcprof/rtcprof_python',
00555                            'OpenRTM_aist/utils/rtcd/rtcd_python'],
00556                  data_files       = unix_data_files)
00557       
00558     # for RTM zip (sdist)
00559     if sys.argv[1] == "sdist":
00560       g_qkc_option = "-m"
00561       is_examples   = False
00562 
00563       core.setup(name             = pkg_name,
00564                  version          = pkg_version,
00565                  description      = pkg_desc,
00566                  author           = pkg_author,
00567                  author_email     = pkg_email,
00568                  url              = pkg_url,
00569                  long_description = pkg_long_desc,
00570                  license          = pkg_license,
00571                  cmdclass         = { "build":Build, "build_idl":Build_idl, "build_doc":Build_doc, "sdist":OtherSetupForSdist},
00572                  packages         = win32_packages,
00573                  scripts= ['OpenRTM_aist/utils/rtcprof/rtcprof_python.bat',
00574                            'OpenRTM_aist/utils/rtcd/rtcd_python.bat',
00575                            'OpenRTM_aist/utils/rtcd/rtcd_python.exe',
00576                            'OpenRTM_aist/ext/sdo/observer/setup.bat'],
00577                  data_files       = win32_data_files,
00578                  script_args      = ["sdist", "--format=zip"])
00579 
00580 
00581       # for examples (sdist)
00582       g_qkc_option = "-u"
00583       pkg_name      = "OpenRTM-aist-Python-example"
00584       pkg_desc      = "Python example components for OpenRTM-aist-1.1"
00585       is_examples   = True
00586 
00587       core.setup(name             = pkg_name,
00588                  version          = pkg_version,
00589                  description      = pkg_desc,
00590                  author           = pkg_author,
00591                  author_email     = pkg_email,
00592                  url              = pkg_url,
00593                  long_description = pkg_long_desc,
00594                  license          = pkg_license,
00595                  cmdclass         = { "build":Build_examples, "build_examples_idl":Build_examples_idl, "sdist":OtherSetupForSdist },
00596                  data_files       = example_data_files,
00597                  script_args      = ["sdist", "--no-defaults"])
00598 
00599 
00600       is_examples   = False
00601 
00602     else:
00603       if examples_install:
00604         # for examples (build, install)
00605         g_qkc_option = "-u"
00606         pkg_name      = "OpenRTM-aist-Python-example"
00607         pkg_desc      = "Python example components for OpenRTM-aist-1.1"
00608 
00609         core.setup(name             = pkg_name,
00610                    version          = pkg_version,
00611                    description      = pkg_desc,
00612                    author           = pkg_author,
00613                    author_email     = pkg_email,
00614                    url              = pkg_url,
00615                    long_description = pkg_long_desc,
00616                    license          = pkg_license,
00617                    cmdclass         = { "build":Build_examples, "build_examples_idl":Build_examples_idl, "sdist":OtherSetupForSdist },
00618                    data_files       = example_data_files)
00619 
00620   elif g_os == "win32":
00621     g_qkc_option = "-m"
00622 
00623     # for RTM
00624     core.setup(name             = pkg_name,
00625                version          = pkg_version,
00626                description      = pkg_desc,
00627                author           = pkg_author,
00628                author_email     = pkg_email,
00629                url              = pkg_url,
00630                long_description = pkg_long_desc,
00631                license          = pkg_license,
00632                cmdclass         = { "build":Build, "build_idl":Build_idl, "build_doc":Build_doc,
00633                                     "install":Install, "install_data":InstallData },
00634                packages         = win32_packages,
00635                scripts= ['OpenRTM_aist/utils/rtcprof/rtcprof_python.bat',
00636                          'OpenRTM_aist/utils/rtcd/rtcd_python.bat',
00637                          'OpenRTM_aist/utils/rtcd/rtcd_python.exe',
00638                          'OpenRTM_aist/ext/sdo/observer/setup.bat'],
00639                data_files       = win32_data_files)
00640 #               script_args      = ["sdist", "--format=zip"])
00641 
00642 except Exception, e:
00643   log.error("Error: %s", e)


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:28