MCPcopy Create free account
hub / github.com/MapServer/MapServer / read_mapscriptvars

Function read_mapscriptvars

mapscript/python/setup.py:71–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69
70
71def read_mapscriptvars():
72
73 # Should be created by the mapserver build process.
74 mapscriptvars = "../../mapscriptvars"
75
76 try:
77 fp = open(mapscriptvars, "r")
78 except IOError, e:
79 raise IOError, '%s. %s' % (e, "Has MapServer been made?")
80
81 output = {}
82 install_dir = fp.readline().strip()
83 defines = fp.readline().strip()
84 includes = fp.readline().strip()
85 libraries = fp.readline().strip()
86 extra_libs = fp.readline().strip()
87 version = fp.readline().strip()
88 if version:
89 version = version.split()[2]
90 version = version.replace('#','')
91 version = version.replace('"','')
92
93 output['version'] = version
94 output['libs'] = libraries
95 output['extra_libs'] = extra_libs
96 output['defines'] = defines
97 output['includes'] = includes
98 fp.close()
99 # print output['libs']
100 # sys.exit(1)
101 return output
102
103def get_config(option, config='mapserver-config'):
104

Callers 1

get_configFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected