83 |
# |
# |
84 |
|
|
85 |
# Directories where Proj4 is installed |
# Directories where Proj4 is installed |
86 |
proj4_prefix = r"D:\cygwin\home\user\proj-4.4.3\src" |
proj4_prefix = r"D:\cygwin\home\user\projects\thuban\proj-4.4.7\src" |
87 |
proj4_incdir = proj4_prefix |
proj4_incdir = proj4_prefix |
88 |
proj4_libdir = proj4_prefix |
proj4_libdir = proj4_prefix |
89 |
proj4_lib = "proj_i" |
proj4_lib = "proj_i" |
90 |
|
|
91 |
# Define include and lib directories for wxWindows |
# Define include and lib directories for wxWindows and |
92 |
wx_prefix = r"D:\wx240" |
wx_prefix = r"d:\cygwin\home\user\projects\thuban\wxPython-2.4.0.7" |
93 |
wx_inc = [os.path.join(wx_prefix, 'lib', 'mswdllh'), |
wx_inc = [os.path.join(wx_prefix, 'lib', 'mswdllh'), |
94 |
os.path.join(wx_prefix, "include")] |
os.path.join(wx_prefix, "include")] |
95 |
wx_lib = [os.path.join(wx_prefix, "lib")] |
wx_lib = [os.path.join(wx_prefix, "lib")] |
96 |
|
|
97 |
# Define include and lib directories for GDAL |
# Define include and lib directories for GDAL |
98 |
gdal_prefix = r"D:\cygwin\home\user\build\gdal-1.1.8" |
gdal_prefix = r"D:\cygwin\home\user\projects\thuban\gdal-1.1.8" |
99 |
gdal_inc = [os.path.join(gdal_prefix, 'alg'), |
gdal_inc = [os.path.join(gdal_prefix, 'alg'), |
100 |
os.path.join(gdal_prefix, 'ogr'), |
os.path.join(gdal_prefix, 'ogr'), |
101 |
os.path.join(gdal_prefix, 'port'), |
os.path.join(gdal_prefix, 'port'), |
102 |
os.path.join(gdal_prefix, 'core')] |
os.path.join(gdal_prefix, 'core')] |
103 |
gdal_lib = gdal_prefix |
gdal_lib = [gdal_prefix] |
104 |
|
|
105 |
# |
# |
106 |
# Unless you use a wxPython version other than 2.4.0, you probably |
# Unless you use a wxPython version other than 2.4.0, you probably |
230 |
# |
# |
231 |
# Define some extension and python modules |
# Define some extension and python modules |
232 |
# |
# |
233 |
# The C-extension names are prefixed woth "Lib." so they get put into |
# The C-extension names are prefixed with "Lib." so they get put into |
234 |
# the Lib/ subdirectory. Lib/ is not really a package but distutils |
# the Lib/ subdirectory. Lib/ is not really a package but distutils |
235 |
# doesn't care |
# doesn't care |
236 |
|
|
237 |
# subdirectory containing the extensions |
# subdirectory containing the distutil extensions |
238 |
ext_dir = "extensions" |
ext_dir = "libraries" |
239 |
|
|
240 |
# subdirectory with some shapelib files |
# subdirectory with some shapelib files |
241 |
shp_dir = ext_dir + "/shapelib" |
shp_dir = ext_dir + "/shapelib" |
296 |
|
|
297 |
data_files = [] |
data_files = [] |
298 |
|
|
299 |
# bitmaps |
# Resources |
300 |
for d, pattern in [("Resources/Bitmaps", "Resources/Bitmaps/*.xpm"), |
for d, patterns in [("Resources/Bitmaps", |
301 |
("Resources/Locale", "Resources/Locale/*/LC_MESSAGES/*.mo") |
("Resources/Bitmaps/*.xpm",)), |
302 |
|
("Resources/Projections", |
303 |
|
("Resources/Projections/*.proj",)), |
304 |
|
("Resources/XML", |
305 |
|
("Resources/XML/*.dtd",)), |
306 |
|
("Extensions/importAPR/samples", |
307 |
|
("Extensions/importAPR/samples/README", |
308 |
|
"Extensions/importAPR/samples/*.apr")), |
309 |
]: |
]: |
310 |
data_files.append((d, glob.glob(pattern))) |
for pattern in patterns: |
311 |
|
data_files.append((d, glob.glob(pattern))) |
312 |
|
if os.path.isdir("Resources/Locale"): |
313 |
|
for d in os.listdir("Resources/Locale"): |
314 |
|
data_files.append(("Resources/Locale/" + d +"/LC_MESSAGES", |
315 |
|
["Resources/Locale/"+ d +"/LC_MESSAGES/thuban.mo"])) |
316 |
|
|
317 |
# |
# |
318 |
# Command definitions |
# Command definitions |
794 |
|
|
795 |
bdist_rpm_prep_script = ''' |
bdist_rpm_prep_script = ''' |
796 |
%setup |
%setup |
797 |
cp extensions/pyshapelib/{README,README.pyshapelib} |
cp libraries/pyshapelib/{README,README.pyshapelib} |
798 |
cp extensions/pyshapelib/{COPYING,COPYING.pyshapelib} |
cp libraries/pyshapelib/{COPYING,COPYING.pyshapelib} |
799 |
cp extensions/pyprojection/{LICENSE,LICENSE.pyprojection} |
cp libraries/pyprojection/{LICENSE,LICENSE.pyprojection} |
800 |
''' |
''' |
801 |
|
|
802 |
bdist_rpm_build_script = ''' |
bdist_rpm_build_script = ''' |
1090 |
[ext_dir + "/thuban/gdalwarp.cpp", |
[ext_dir + "/thuban/gdalwarp.cpp", |
1091 |
ext_dir + "/thuban/cpl_mfile.cpp", |
ext_dir + "/thuban/cpl_mfile.cpp", |
1092 |
ext_dir + "/thuban/bmpdataset.cpp"], |
ext_dir + "/thuban/bmpdataset.cpp"], |
1093 |
include_dirs = ([gdal_cs_params[CS_INCDIRS], |
include_dirs = gdal_cs_params[CS_INCDIRS] + |
1094 |
ext_dir + "/thuban/"]), |
[ext_dir + "/thuban/"], |
1095 |
define_macros = gdal_cs_params[CS_DEFS], |
define_macros = gdal_cs_params[CS_DEFS], |
1096 |
library_dirs = gdal_cs_params[CS_LIBDIRS], |
library_dirs = gdal_cs_params[CS_LIBDIRS], |
1097 |
libraries = [proj4_lib] + |
libraries = gdal_cs_params[CS_LIBS])) |
|
gdal_cs_params[CS_LIBS])) |
|
1098 |
|
|
1099 |
def run(self, install_options = None): |
def run(self, install_options = None): |
1100 |
build_ext.run(self) |
build_ext.run(self) |
1108 |
""" |
""" |
1109 |
|
|
1110 |
setup(name = "Thuban", |
setup(name = "Thuban", |
1111 |
version = "0.2.0", |
version = "1.0.0", |
1112 |
description = "Geographic data viewer", |
description = "Geographic data viewer", |
1113 |
long_description = long_description, |
long_description = long_description, |
1114 |
licence = "GPL", |
license = "GPL", |
1115 |
author = "Intevation GmbH", |
author = "Intevation GmbH", |
1116 |
author_email = "[email protected]", |
author_email = "[email protected]", |
1117 |
url = "http://thuban.intevation.de/", |
url = "http://thuban.intevation.de/", |
1118 |
|
|
1119 |
scripts = ["thuban.py"], |
scripts = ["thuban.py"], |
1120 |
packages = ["Thuban", "Thuban.Lib", "Thuban.Model", "Thuban.UI"], |
packages = ["Thuban", "Thuban.Lib", "Thuban.Model", "Thuban.UI", |
1121 |
|
"Extensions", "Extensions.gns2shp", "Extensions.wms", |
1122 |
|
"Extensions.importAPR", "Extensions.profiling"], |
1123 |
ext_modules = extensions, |
ext_modules = extensions, |
1124 |
py_modules = py_modules, |
py_modules = py_modules, |
1125 |
data_files = data_files, |
data_files = data_files, |