Changeset 9

Show
Ignore:
Timestamp:
04/14/06 03:30:24 (3 years ago)
Author:
astraw
Message:

removed scons from build process

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/billhart/modules.py

    r7 r9  
    1414    ] 
    1515 
    16 py_modules = [ 
    17     'PyOSG' 
    18 ] 
    19  
    2016node_kits = [ 
    2117    'osgScript', 
  • branches/billhart/setup.py

    r7 r9  
    77import os, shutil, sys 
    88from distutils.core import setup, Extension 
    9 from distutils.command.build import build 
    10 from distutils.command.clean import clean 
    11 from distutils.command.install import install 
    12 from distutils.file_util import copy_file 
    13  
    14 try: 
    15   import py2app 
    16   import bdist_mpkg 
    17 except: 
    18   pass 
    199 
    2010import modules 
    21  
    22 class pyosg_build(build): 
    23     def run(self): 
    24         destination = os.path.join(self.build_platlib, 'PyOSG') 
    25  
    26         command = sys.executable + " scons" + os.sep + "scons.py install=" + destination 
    27  
    28         if os.system(command): 
    29             print "Could not build shared PyOSG library! Executed : ", command 
    30             sys.exit(1) 
    31  
    32 class pyosg_clean(clean): 
    33     def run(self): 
    34         clean.run(self) 
    35         destination = os.path.join(self.build_lib, 'PyOSG') 
    36  
    37         if os.system(sys.executable + " scons" + os.sep + "scons.py -c install=" + destination): 
    38             print "Could not clean PyOSG library!" 
    39             sys.exit(1) 
    40  
    41 class pyosg_install(install): 
    42     def run(self): 
    43         install.run(self) 
    4411 
    4512try: 
     
    7542            cppfile = os.path.join(libname, file) 
    7643            cppfiles.append(cppfile) 
    77     extensions.append(Extension("PyOSG." + libname, cppfiles)) 
     44    extensions.append(Extension("PyOSG." + libname, 
     45                                cppfiles, 
     46                                include_dirs=['include'], 
     47                                define_macros=[('VERSION','"'+__version__+'"')], 
     48                                libraries=['boost_python','Producer']+modules.ext_modules)) 
    7849 
    7950setup(name = "PyOSG", 
     
    8556      download_url = "http://pyosg.sourceforge.net", 
    8657      url = "http://pyosg.sourceforge.net", 
    87       cmdclass = {'build'   : pyosg_build, 
    88                   'clean'   : pyosg_clean, 
    89                   'install' : pyosg_install}, 
    9058      ext_modules = extensions, 
    91       py_modules  = modules.py_modules, 
    9259      classifiers = filter(None, PYOSG_CLASSIFIERS.split("\n")), 
    9360      license = "BSD License", 
    94       packages=['PyOSG', 'PyOSG.Demo', 'PyOSG.Demo.Script'], 
     61      packages=['PyOSG'], 
    9562      platforms=['Win32', 'Linux', 'Mac_OSX'], 
    9663)