-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.html
More file actions
301 lines (274 loc) · 16.8 KB
/
install.html
File metadata and controls
301 lines (274 loc) · 16.8 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Build and Install — intro</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/pycgns.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="shortcut icon" href="_static/pyCGNS-logo-tiny.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Glossary" href="glossary.html" />
<link rel="prev" title="Which patterns in which example?" href="ch2/crosstable.html" />
</head><body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="search.html" title="search"
accesskey="S">search</a>
</li>
<li class="right" >
<a href="glossary.html" title="glossary"
accesskey="G">glossary</a>
|</li>
<li class="right" >
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
|</li>
<li class="right" >
<a href="glossary.html" title="Glossary"
accesskey="N">next</a>
|</li>
<li class="right" >
<a href="ch2/crosstable.html" title="Which patterns in which example?"
accesskey="P">previous</a>
|</li>
<li class="right" >
<a href="index.html" title="pyCGNS top page"
accesskey="M">top</a>
|</li>
<li><a href=index.html>pyCGNS</a> »</li>
<li class="nav-item nav-item-0"><a href="index.html">intro</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 align=center><a href="index.html">
<img class="logo" src="_static/intro-logo-small.png" alt="pyCGNS"/>
</a></h1>
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Build and Install</a><ul>
<li><a class="reference internal" href="#required-libraries">Required libraries</a></li>
<li><a class="reference internal" href="#installation-process">Installation process</a></li>
<li><a class="reference internal" href="#single-module-installation">Single module installation</a></li>
<li><a class="reference internal" href="#configuration-file-contents">Configuration file contents</a><ul>
<li><a class="reference internal" href="#anaconda-installation">Anaconda installation</a></li>
<li><a class="reference internal" href="#module-dependancies">Module dependancies</a></li>
</ul>
</li>
<li><a class="reference internal" href="#nav-depends">NAV depends</a></li>
<li><a class="reference internal" href="#map-depends">MAP depends</a></li>
</ul>
</li>
<li><a class="reference internal" href="#test">Test</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="build-and-install">
<h1>Build and Install<a class="headerlink" href="#build-and-install" title="Permalink to this headline">¶</a></h1>
<p id="index-0">The installation described here is for UNIX platforms only. The MS-Windows version is distributed as
a self-installable Windows package. You can also use an <em>Anaconda</em> prebuilt package, see below.</p>
<p>The installation process is easy in the case you already have the required
libraries and a standard configuration.</p>
<div class="section" id="required-libraries">
<h2>Required libraries<a class="headerlink" href="#required-libraries" title="Permalink to this headline">¶</a></h2>
<p>The first step of the installation is to make sure you have the required
libraries. We have now a quite large set of libraries, we are trying hard to
use well known and easy to install libraries but we must admit this could
be a difficult task to install all by yourself…</p>
<p>The mandatory libs are <em>Python</em>, <em>numpy</em>, <em>HDF5</em>, <em>Cython</em>.
The libs <em>PyQT</em>, <em>Qt</em>, <em>VTK</em> are optional.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The <em>libcgns</em> (<a class="reference internal" href="glossary.html#term-CGNS-MLL"><span class="xref std std-term">CGNS/MLL</span></a>) is <strong>NOT</strong> used by pyCGNS.</p>
</div>
<p>The complete set of required tools/modules/libraries contains Python, HDF5
and other graphical toolkits:</p>
<ul class="simple">
<li><p><a class="reference external" href="http://www.python.org">Python</a> (starting from v2.7 or v3.6)</p></li>
<li><p><a class="reference external" href="http://numpy.scipy.org">numpy</a> (v1.1 +)</p></li>
<li><p><a class="reference external" href="http://www.cython.org">cython</a> (v0.19 +)</p></li>
<li><p><a class="reference external" href="http://www.hdfgroup.org">hdf5</a> (v1.8.5 +)</p></li>
<li><p><a class="reference external" href="http://www.vtk.org">VTK</a> (v8.0 +)</p></li>
<li><p><a class="reference external" href="http://www.qt.io/download">Qt</a> (v4.7 +)</p></li>
</ul>
<p>The <em>VTK</em> and the <em>Qt</em> graphical toolkits need to have a Python binding.
The important point is to use the <strong>native</strong> Python binding of these toolkits,
not any other (see installation details hereafter).</p>
<p>No Python binding is required for HDF5.</p>
</div>
<div class="section" id="installation-process">
<span id="index-1"></span><h2>Installation process<a class="headerlink" href="#installation-process" title="Permalink to this headline">¶</a></h2>
<p>Once you have these installed you can proceed with pyCGNS.
You go into the top directory and you edit the <code class="docutils literal notranslate"><span class="pre">pyCGNSconfig.py.in</span></code>
(see <a class="reference internal" href="#pycgnsconfigpyin"><span class="std std-ref">Configuration file contents</span></a>).
You have to set the correct paths and various values such as directory search
libs or flags.</p>
<p id="index-2">Then you run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">build</span>
</pre></div>
</div>
<p>and then:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<p>or:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span> <span class="o">--</span><span class="n">prefix</span><span class="o">=/</span><span class="n">local</span><span class="o">/</span><span class="n">tools</span><span class="o">/</span><span class="n">installation</span>
</pre></div>
</div>
<p>All the modules of the pyCGNS package are installed and you can now
proceed with tutorial examples.</p>
</div>
<div class="section" id="single-module-installation">
<h2>Single module installation<a class="headerlink" href="#single-module-installation" title="Permalink to this headline">¶</a></h2>
<p>You can ask for a single module installation:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">build</span> <span class="o">--</span><span class="n">single</span><span class="o">-</span><span class="n">module</span><span class="o">=</span><span class="n">MAP</span>
<span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<p>You have to check that this installation doesn’t overwrite an existing
installation with the other pyCGNS modules.</p>
</div>
<div class="section" id="configuration-file-contents">
<span id="pycgnsconfigpyin"></span><h2>Configuration file contents<a class="headerlink" href="#configuration-file-contents" title="Permalink to this headline">¶</a></h2>
<p id="index-3">The <code class="docutils literal notranslate"><span class="pre">pyCGNSconfig_user.py</span></code> should work with no modification if you have
a standard installation. All you have to declare is the directory in which
we can find <em>Python/numpy/hdf5/CHLone/cgns</em> libraries.</p>
<p>If you have specific installations you can change some paths/flags for each
external library: <em>hdf5</em>, <em>numpy</em>. The configuration
file is a Python file, it is imported after the default configuration. The
changes you make in the configuration file will overwrite the defaults:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># --- stuff to add for HDF5</span>
<span class="c1">#HDF5_VERSION = ''</span>
<span class="n">HDF5_PATH_INCLUDES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'/home/myself/hdf5/include'</span><span class="p">]</span>
<span class="n">HDF5_PATH_LIBRARIES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'/home/myself/hdf5/lib'</span><span class="p">]</span>
<span class="c1">#HDF5_LINK_LIBRARIES = []</span>
<span class="c1">#HDF5_EXTRA_ARGS = []</span>
</pre></div>
</div>
<p>To avoid overwriting, use Python to update the config:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># --- stuff to add for HDF5</span>
<span class="c1">#HDF5_VERSION = ''</span>
<span class="n">HDF5_PATH_INCLUDES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'/home/myself/hdf5/include'</span><span class="p">]</span>
<span class="n">HDF5_PATH_LIBRARIES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'/home/myself/hdf5/lib'</span><span class="p">]</span>
<span class="c1">#HDF5_LINK_LIBRARIES = []</span>
<span class="n">HDF5_EXTRA_ARGS</span> <span class="o">=</span> <span class="n">HDF5_EXTRA_ARGS</span> <span class="o">+</span> <span class="p">[</span><span class="s1">'-DMYFLAG'</span><span class="p">]</span>
</pre></div>
</div>
<p>You do not have to specify the VTK nor the Qt libraries, there is no direct
link to these libraries: the Python modules will do that.</p>
<div class="section" id="anaconda-installation">
<h3>Anaconda installation<a class="headerlink" href="#anaconda-installation" title="Permalink to this headline">¶</a></h3>
<p>Anaconda framework is a good options for your windows installation.
You have to carefully check your Anaconda/HDF5 version:</p>
<blockquote>
<div><ul class="simple">
<li><p>with HDF5 v1.8 you are 100% compatible CGNS/HDF5</p></li>
<li><p>with HDF5 v1.10.1 not yet compatible would require on the fly translation</p></li>
<li><p>with HDF5 v1.10.2 (some checks still on the way…)</p></li>
</ul>
</div></blockquote>
<p>If you have version issues, check this thread:
<a class="reference external" href="https://groups.google.com/forum/#!topic/h5py/j6wolQ1vJgE">https://groups.google.com/forum/#!topic/h5py/j6wolQ1vJgE</a></p>
</div>
<div class="section" id="module-dependancies">
<h3>Module dependancies<a class="headerlink" href="#module-dependancies" title="Permalink to this headline">¶</a></h3>
<p>The pyCGNS modules have dependancies with their brothers. The list below
gives you the required modules (or optional) for each of them.</p>
<blockquote>
<div><ul class="simple">
<li><p>MAP : None</p></li>
<li><p>PAT : MAP</p></li>
<li><p>APP : PAT MAP</p></li>
<li><p>NAV : PAT MAP APP</p></li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="nav-depends">
<h2>NAV depends<a class="headerlink" href="#nav-depends" title="Permalink to this headline">¶</a></h2>
<p>The CGNS.NAV tool uses two graphical toolkits, one for the GUI (Qt) and another
one for the graphical view window (VTK). The VTK toolkit must have its
Python binding installed. You should not use <cite>pyVTK</cite> but the native Python
binding of VTK. To do so, edit the VTK configuration file to set the Python
wrapping and all associated paths. And example of production could be:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">VTK</span>
<span class="n">mkdir</span> <span class="n">B</span>
<span class="n">cd</span> <span class="n">B</span>
<span class="n">cmake</span> <span class="o">..</span>
</pre></div>
</div>
<p>Then edit the <cite>CMakeCache.txt</cite> file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">//</span><span class="n">Wrap</span> <span class="n">VTK</span> <span class="n">classes</span> <span class="n">into</span> <span class="n">the</span> <span class="n">Python</span> <span class="n">language</span><span class="o">.</span>
<span class="n">VTK_WRAP_PYTHON</span><span class="p">:</span><span class="n">BOOL</span><span class="o">=</span><span class="n">ON</span>
</pre></div>
</div>
<p>And build/install…</p>
<p>The Qt toolkit is used with the qtpy package and provides support for PyQt5 or PySide Python bindings, which are official
binding with this langage. You can check you have the
correct bindings by typing:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span>
<span class="o">>>></span><span class="kn">import</span> <span class="nn">vtk</span>
<span class="o">>>></span><span class="kn">import</span> <span class="nn">qtpy</span>
</pre></div>
</div>
<p>Both should not fail…</p>
</div>
<div class="section" id="map-depends">
<h2>MAP depends<a class="headerlink" href="#map-depends" title="Permalink to this headline">¶</a></h2>
<p>The embedded <em>CHLone</em> library is required and thus <em>HDF5</em> is required.</p>
<p>Map also depends on <em>Cython</em>.</p>
</div>
</div>
<div class="section" id="test">
<span id="testsupport"></span><h1>Test<a class="headerlink" href="#test" title="Permalink to this headline">¶</a></h1>
<p>Some of the pyCGNS modules have embedded tests. Once you have installed
pyCGNS, you can run each test suite from another user account/directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">c</span> <span class="s1">'import CGNS.MAP.test;CGNS.MAP.test.run()'</span>
</pre></div>
</div>
<p>All modules tests can be run the same way, replace <code class="docutils literal notranslate"><span class="pre">MAP</span></code> by any of
<code class="docutils literal notranslate"><span class="pre">PAT</span></code>, <code class="docutils literal notranslate"><span class="pre">VAL</span></code>, <code class="docutils literal notranslate"><span class="pre">NAV</span></code>, <code class="docutils literal notranslate"><span class="pre">APP</span></code>. You can run all the
tests by importing <code class="docutils literal notranslate"><span class="pre">CGNS.test</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">c</span> <span class="s1">'import CGNS.PAT.test;CGNS.PAT.test.run()'</span>
<span class="n">python</span> <span class="o">-</span><span class="n">c</span> <span class="s1">'import CGNS.test'</span>
</pre></div>
</div>
<p>The tests are running silently, if there is a problem you would see a stack
error on the output.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018-2022, M. P..
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
</html>