Changeset 9
- Timestamp:
- 04/14/06 03:30:24 (3 years ago)
- Files:
-
- branches/billhart/modules.py (modified) (1 diff)
- branches/billhart/scons (deleted)
- branches/billhart/setup.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/billhart/modules.py
r7 r9 14 14 ] 15 15 16 py_modules = [17 'PyOSG'18 ]19 20 16 node_kits = [ 21 17 'osgScript', branches/billhart/setup.py
r7 r9 7 7 import os, shutil, sys 8 8 from distutils.core import setup, Extension 9 from distutils.command.build import build10 from distutils.command.clean import clean11 from distutils.command.install import install12 from distutils.file_util import copy_file13 14 try:15 import py2app16 import bdist_mpkg17 except:18 pass19 9 20 10 import 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=" + destination27 28 if os.system(command):29 print "Could not build shared PyOSG library! Executed : ", command30 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)44 11 45 12 try: … … 75 42 cppfile = os.path.join(libname, file) 76 43 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)) 78 49 79 50 setup(name = "PyOSG", … … 85 56 download_url = "http://pyosg.sourceforge.net", 86 57 url = "http://pyosg.sourceforge.net", 87 cmdclass = {'build' : pyosg_build,88 'clean' : pyosg_clean,89 'install' : pyosg_install},90 58 ext_modules = extensions, 91 py_modules = modules.py_modules,92 59 classifiers = filter(None, PYOSG_CLASSIFIERS.split("\n")), 93 60 license = "BSD License", 94 packages=['PyOSG' , 'PyOSG.Demo', 'PyOSG.Demo.Script'],61 packages=['PyOSG'], 95 62 platforms=['Win32', 'Linux', 'Mac_OSX'], 96 63 )
