setup.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. 'XCFLAGS',
  25. 'XMINC',
  26. 'OPENGLLIB',
  27. 'OPENGLULIB'):
  28. update_opts(flag, macros, inc_dirs, lib_dirs, libs)
  29. setup(
  30. ext_modules= [
  31. Extension(
  32. name = '_grass7_wxnviz',
  33. sources=["change_view.cpp",
  34. "draw.cpp",
  35. "init.cpp",
  36. "lights.cpp",
  37. "load.cpp",
  38. "surface.cpp",
  39. "vector.cpp",
  40. "volume.cpp",
  41. "grass7_wxnviz.i"],
  42. swig_opts = ['-c++',
  43. '-shadow'],
  44. define_macros = macros,
  45. include_dirs = inc_dirs,
  46. library_dirs = lib_dirs,
  47. libraries = libs,
  48. )
  49. ]
  50. )