/[thuban]/branches/WIP-pyshapelib-bramz/setup.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/setup.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2002 by bh, Mon Dec 1 19:45:10 2003 UTC revision 2537 by jonathan, Fri Jan 21 14:01:25 2005 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001, 2002, 2003 by Intevation GmbH  # Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH
2  # Authors:  # Authors:
3  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
4  #  #
# Line 15  __version__ = "$Revision$" Line 15  __version__ = "$Revision$"
15  # hand below.  # hand below.
16  #  #
17    
18    import sys
19  import os  import os
20  from types import TupleType  from types import TupleType
21  import glob  import glob
# Line 81  elif os.name == "nt": Line 82  elif os.name == "nt":
82      #################################################################      #################################################################
83      # Windows configuration.      # Windows configuration.
84      #      #
85        
86        basedir = os.path.dirname(sys.argv[0])
87    
88      # Directories where Proj4 is installed      # Directories where Proj4 is installed
89      proj4_prefix = r"D:\cygwin\home\user\projects\thuban\proj-4.4.7\src"      proj4_prefix = os.path.join(basedir, "..", "proj-4.4.7", "src")
90      proj4_incdir =  proj4_prefix      proj4_incdir =  proj4_prefix
91      proj4_libdir =  proj4_prefix      proj4_libdir =  proj4_prefix
92      proj4_lib = "proj_i"      proj4_lib = "proj_i"
93    
94      # Define include and lib directories for wxWindows and      # Define include and lib directories for wxWindows and
95      wx_prefix = r"d:\cygwin\home\user\projects\thuban\wxPython-2.4.0.7"      wx_prefix = os.path.join(basedir, "..", "wxPython-2.4.2.4")
96      wx_inc = [os.path.join(wx_prefix, 'lib', 'mswdllh'),      wx_inc = [os.path.join(wx_prefix, 'lib', 'mswdllh'),
97                os.path.join(wx_prefix, "include")]                os.path.join(wx_prefix, "include")]
98      wx_lib = [os.path.join(wx_prefix, "lib")]      wx_lib = [os.path.join(wx_prefix, "lib")]
99    
100      # Define include and lib directories for GDAL      # Define include and lib directories for GDAL
101      gdal_prefix = r"D:\cygwin\home\user\projects\thuban\gdal-1.1.8"      gdal_prefix = os.path.join(basedir, "..", "gdal-1.1.8")
102      gdal_inc = [os.path.join(gdal_prefix, 'alg'),      gdal_inc = [os.path.join(gdal_prefix, 'alg'),
103                  os.path.join(gdal_prefix, 'ogr'),                  os.path.join(gdal_prefix, 'ogr'),
104                  os.path.join(gdal_prefix, 'port'),                  os.path.join(gdal_prefix, 'port'),
# Line 275  extensions.append(Extension("Lib.shptree Line 278  extensions.append(Extension("Lib.shptree
278  extensions.append(Extension("Lib.dbflibc",  extensions.append(Extension("Lib.dbflibc",
279                              [ext_dir + "/pyshapelib/dbflib_wrap.c",                              [ext_dir + "/pyshapelib/dbflib_wrap.c",
280                               shp_dir + "/dbfopen.c"],                               shp_dir + "/dbfopen.c"],
281                              include_dirs = [shp_dir]))                              include_dirs = [shp_dir],
282                                define_macros = [("HAVE_UPDATE_HEADER", "1")]))
283  for name in ("shapelib", "dbflib"):  for name in ("shapelib", "dbflib"):
284      py_modules.append(ext_dir + "/pyshapelib/" + name)      py_modules.append(ext_dir + "/pyshapelib/" + name)
285    
# Line 297  py_modules.append(ext_dir + "/pyprojecti Line 301  py_modules.append(ext_dir + "/pyprojecti
301  data_files = []  data_files = []
302    
303  # Resources  # Resources
304  for d, pattern in [("Resources/Bitmaps", "Resources/Bitmaps/*.xpm"),  for d, patterns in [("Resources/Bitmaps",
305                     ("Resources/Projections", "Resources/Projections/*.proj"),                      ("Resources/Bitmaps/*.xpm",)),
306                     ("Resources/XML", "Resources/XML/*.dtd")]:                     ("Resources/Projections",
307      data_files.append((d, glob.glob(pattern)))                      ("Resources/Projections/*.proj",)),
308                       ("Resources/XML",
309                        ("Resources/XML/*.dtd",)),
310                       ("Extensions/importAPR/samples",
311                        ("Extensions/importAPR/samples/README",
312                         "Extensions/importAPR/samples/*.apr")),
313                       ]:
314        for pattern in patterns:
315            data_files.append((d, glob.glob(pattern)))
316  if os.path.isdir("Resources/Locale"):  if os.path.isdir("Resources/Locale"):
317      for d in os.listdir("Resources/Locale"):      for d in os.listdir("Resources/Locale"):
318          data_files.append(("Resources/Locale/" + d +"/LC_MESSAGES",          data_files.append(("Resources/Locale/" + d +"/LC_MESSAGES",
# Line 1079  class thuban_build_ext(build_ext): Line 1091  class thuban_build_ext(build_ext):
1091          build_ext.finalize_options(self)          build_ext.finalize_options(self)
1092          if self.with_gdal and include_gdal:          if self.with_gdal and include_gdal:
1093              self.extensions.append(Extension("Lib.gdalwarp",              self.extensions.append(Extension("Lib.gdalwarp",
1094                                  [ext_dir + "/thuban/gdalwarp.cpp",                                  [ext_dir + "/thuban/gdalwarp.cpp"],
                                 ext_dir + "/thuban/cpl_mfile.cpp",  
                                 ext_dir + "/thuban/bmpdataset.cpp"],  
1095                                  include_dirs = gdal_cs_params[CS_INCDIRS] +                                  include_dirs = gdal_cs_params[CS_INCDIRS] +
1096                                                 [ext_dir + "/thuban/"],                                                 [ext_dir + "/thuban/"],
1097                                  define_macros = gdal_cs_params[CS_DEFS],                                  define_macros = gdal_cs_params[CS_DEFS],
# Line 1100  Thuban is a viewer for geographic data w Line 1110  Thuban is a viewer for geographic data w
1110  """  """
1111    
1112  setup(name = "Thuban",  setup(name = "Thuban",
1113        version = "1.0rc1",        version = "1.0.0",
1114        description = "Geographic data viewer",        description = "Geographic data viewer",
1115        long_description = long_description,        long_description = long_description,
1116        licence = "GPL",        license = "GPL",
1117        author = "Intevation GmbH",        author = "Intevation GmbH",
1118        author_email = "[email protected]",        author_email = "[email protected]",
1119        url = "http://thuban.intevation.de/",        url = "http://thuban.intevation.de/",
1120    
1121        scripts = ["thuban.py"],        scripts = ["thuban.py"],
1122        packages = ["Thuban", "Thuban.Lib", "Thuban.Model", "Thuban.UI"],        packages = ["Thuban", "Thuban.Lib", "Thuban.Model", "Thuban.UI",
1123                      "Extensions", "Extensions.gns2shp", "Extensions.wms",
1124                      "Extensions.importAPR", "Extensions.profiling"],
1125        ext_modules = extensions,        ext_modules = extensions,
1126        py_modules = py_modules,        py_modules = py_modules,
1127        data_files = data_files,        data_files = data_files,

Legend:
Removed from v.2002  
changed lines
  Added in v.2537

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26