forked from griddb/python_client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmake_build_guide.html
More file actions
356 lines (270 loc) · 10 KB
/
cmake_build_guide.html
File metadata and controls
356 lines (270 loc) · 10 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Cmake Build Guide For GridDB Python Client</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="title" content="Cmake Build Guide For GridDB Python Client"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2019-08-26T10:58+0900"/>
<meta name="author" content=""/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
html { font-family: Helvetica; font-size: 12pt; }
.title { text-align: center; }
.todo { color: red; }
.done { color: green; }
.tag { background-color: #add8e6; font-weight:normal }
.target { }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
p.verse { margin-left: 3% }
pre {
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
font-family: Courier New, Courier, monospace;
font-size: 90%;
overflow:auto;
}
table { border-collapse: collapse; }
td, th { vertical-align: top; }
dt { font-weight: bold; }
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
.linenr { font-size:smaller }
.code-highlighted {background-color:#ffff00;}
.org-info-js_info-navigation { border-style:none; }
#org-info-js_console-label { font-size:10px; font-weight:bold;
white-space:nowrap; }
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
font-weight:bold; }
del { color: gray; }
/*]]>*/-->
</style>
<STYLE type="text/css">
<!-
.break { page-break-before: always; }
-->
</STYLE>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<div id="preamble">
</div>
<div id="content">
<h1 class="title">Cmake Build Guide For GridDB Python Client</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Building the GridDB python client</a>
<ul>
<li><a href="#sec-1-1">1.1 Confirming the environment</a></li>
<li><a href="#sec-1-2">1.2 Required software to build GridDB python client</a></li>
<li><a href="#sec-1-3">1.3 Installing required software</a>
<ul>
<li><a href="#sec-1-3-1">1.3.1 Install cmake</a></li>
<li><a href="#sec-1-3-2">1.3.2 Install python</a></li>
<li><a href="#sec-1-3-3">1.3.3 Install swig</a></li>
<li><a href="#sec-1-3-4">1.3.4 Install GridDB C client</a></li>
</ul>
</li>
<li><a href="#sec-1-4">1.4 Building GridDB python client</a>
<ul>
<li><a href="#sec-1-4-1">1.4.1 Generate standard build files from cmake</a></li>
<li><a href="#sec-1-4-2">1.4.2 Build python client</a></li>
</ul>
</li>
<li><a href="#sec-1-5">1.5 Run sample to check for building Python client</a></li>
</ul>
</li>
</ul>
</div>
</div>
<DIV class="break"></DIV><BR>
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Building the GridDB python client</h2>
<div class="outline-text-2" id="text-1">
<p>
This section shows how to build the GridDB python client on a single machine.
</p>
</div>
<div id="outline-container-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> Confirming the environment</h3>
<div class="outline-text-3" id="text-1-1">
<p>
Confirm that OS is Windows 10 64 bit
</p>
</div>
</div>
<div id="outline-container-1-2" class="outline-3">
<h3 id="sec-1-2"><span class="section-number-3">1.2</span> Required software to build GridDB python client</h3>
<div class="outline-text-3" id="text-1-2">
<ul>
<li>cmake: version 3.14.5
</li>
<li>python: version 3.6.4
</li>
<li>swig: version 3.0.12
</li>
<li>GridDB C client: version 4.2.0
</li>
</ul>
<p>In order to build, we also need to install Visual Studio 2017
</p>
</div>
</div>
<div id="outline-container-1-3" class="outline-3">
<h3 id="sec-1-3"><span class="section-number-3">1.3</span> Installing required software</h3>
<div class="outline-text-3" id="text-1-3">
</div>
<div id="outline-container-1-3-1" class="outline-4">
<h4 id="sec-1-3-1"><span class="section-number-4">1.3.1</span> Install cmake</h4>
<div class="outline-text-4" id="text-1-3-1">
<ul>
<li>Download zip package from <a href="https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-win64-x64.zip">https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-win64-x64.zip</a>
</li>
<li>Extract the zip package and get resource of cmake tool
</li>
</ul>
</div>
</div>
<div id="outline-container-1-3-2" class="outline-4">
<h4 id="sec-1-3-2"><span class="section-number-4">1.3.2</span> Install python</h4>
<div class="outline-text-4" id="text-1-3-2">
<ul>
<li>Download and install python 3.6.4 from <a href="https://www.python.org/ftp/python/3.6.4/python-3.6.4-amd64.exe">https://www.python.org/ftp/python/3.6.4/python-3.6.4-amd64.exe</a>
</li>
<li>Set path for PYTHON_RESOURCE in <b>CmakeList.txt</b>
</li>
</ul>
<pre class="example">set(PYTHON_RESOURCE C:/Users/username/AppData/Local/Programs/Python/Python36)
</pre>
</div>
</div>
<div id="outline-container-1-3-3" class="outline-4">
<h4 id="sec-1-3-3"><span class="section-number-4">1.3.3</span> Install swig</h4>
<div class="outline-text-4" id="text-1-3-3">
<ul>
<li>Download zip package from <a href="https://sourceforge.net/projects/swig/files/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip/download">https://sourceforge.net/projects/swig/files/swigwin/swigwin-3.0.12/swigwin-3.0.12.zip/download</a>
</li>
<li>Extract the zip package then set path for SWIG_RESOURCE in <b>CmakeList.txt</b>
</li>
</ul>
<pre class="example">set(SWIG_RESOURCE E:/swigwin-3.0.12)
</pre>
</div>
</div>
<div id="outline-container-1-3-4" class="outline-4">
<h4 id="sec-1-3-4"><span class="section-number-4">1.3.4</span> Install GridDB C client</h4>
<div class="outline-text-4" id="text-1-3-4">
<ul>
<li>Please refer to <a href="https://github.com/griddb/c_client">https://github.com/griddb/c\_client</a> to install GridDB C client.
</li>
<li>After installing GridDB C client, set path for C_LIB (path for gridstore_c.lib) and C_HEADER (path for gridstore.h) in <b>CmakeList.txt</b>
</li>
</ul>
<pre class="example">set(C_LIB E:/c_client-master/bin/x64/Release)
set(C_HEADER E:/c_client-master/client/c/include)
</pre>
</div>
</div>
</div>
<div id="outline-container-1-4" class="outline-3">
<h3 id="sec-1-4"><span class="section-number-3">1.4</span> Building GridDB python client</h3>
<div class="outline-text-3" id="text-1-4">
<p>Before building Griddb python client, please set link for SOURCE_HEADER (link to folder store cpp headers) in <b>CmakeList.txt</b>
</p>
<pre class="example">set(SOURCE_HEADER E:/SourceCode/src)
</pre>
</div>
<div id="outline-container-1-4-1" class="outline-4">
<h4 id="sec-1-4-1"><span class="section-number-4">1.4.1</span> Generate standard build files from cmake</h4>
<div class="outline-text-4" id="text-1-4-1">
<ul>
<li>Open <PATH_TO_CMAKE>/cmake-3.14.5-win64-x64/bin/cmake-gui.exe
</li>
<li>Set link for <b>source code</b> in cmake gui: link to folder store <b>CmakeList.txt</b>
</li>
<li>Set link for <b>the binaries</b> in cmake gui: link to folder which generated files are store (sln file, py file)
</li>
<li>Run <b>Configure</b> with set <b>Specify the generator for this project</b> is <b>Visual Studio 15 2017</b>, and for <b>Optional toolset to use</b> is <b>x64</b>
</li>
<li>Run <b>Generate</b> to get standard build files
</li>
</ul>
</div>
</div>
<div id="outline-container-1-4-2" class="outline-4">
<h4 id="sec-1-4-2"><span class="section-number-4">1.4.2</span> Build python client</h4>
<div class="outline-text-4" id="text-1-4-2">
<ul>
<li>Open <PATH_TO_OUTPUT_CMAKE>/griddb_python.sln by Visual Studio 2017
</li>
<li>Build <b>griddb_python</b> project to get <b>_griddb_python.pyd</b> library and <b>griddb_python.py</b> interface
</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-1-5" class="outline-3">
<h3 id="sec-1-5"><span class="section-number-3">1.5</span> Run sample to check for building Python client</h3>
<div class="outline-text-3" id="text-1-5">
<ul>
<li>Put <b>_griddb_python.pyd</b>, <b>gridstore_c.dll</b> libraries and <b>griddb_python.py</b> interface into folder store <b>sample1.py</b>
</li>
</ul>
<pre class="example"><PATH_TO>/python.exe sample1.py 239.0.0.1 <port> <cluster> <username> <password>
</pre>
</div>
</div>
</div>
</div>
<div id="postamble">
</div>
</body>
</html>