setup.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/usr/bin/env python
  2. # Setup script for wxGUI vdigit extension.
  3. import os
  4. import sys
  5. sys.path.append('..')
  6. from build_ext import variables
  7. from build_ext import update_opts
  8. from distutils.core import setup, Extension
  9. macros = [('PACKAGE', '"grasslibs"')]
  10. inc_dirs = [os.path.join(variables['GRASS_HOME'],
  11. 'dist.' + variables['ARCH'],
  12. 'include')]
  13. lib_dirs = [os.path.join(variables['GRASS_HOME'],
  14. 'dist.' + variables['ARCH'],
  15. 'lib')]
  16. libs = ['grass_gis',
  17. 'grass_nviz',
  18. 'grass_ogsf',
  19. 'grass_g3d']
  20. for flag in ('GDALCFLAGS',
  21. 'GDALLIBS',
  22. 'WXWIDGETSCXXFLAGS',
  23. 'WXWIDGETSLIB'):
  24. update_opts(flag, macros, inc_dirs, lib_dirs, libs)
  25. setup(
  26. ext_modules= [
  27. Extension(
  28. name = '_grass7_wxnviz',
  29. sources=["change_view.cpp",
  30. "draw.cpp",
  31. "init.cpp",
  32. "lights.cpp",
  33. "load.cpp",
  34. "surface.cpp",
  35. "vector.cpp",
  36. "volume.cpp",
  37. "grass7_wxnviz.i"],
  38. swig_opts = ['-c++',
  39. '-shadow'],
  40. define_macros = macros,
  41. include_dirs = inc_dirs,
  42. library_dirs = lib_dirs,
  43. libraries = libs,
  44. )
  45. ]
  46. )