comparison Sphinx/source/plugins/python.rst @ 442:8b2c648c0f46

clarifications about windows precompiled binaries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 May 2020 20:59:55 +0200
parents ba486cac480a
children fcc352fd4283
comparison
equal deleted inserted replaced
441:c2ae93c562d2 442:8b2c648c0f46
145 Pre-compiled binaries for Microsoft Windows `are also available 145 Pre-compiled binaries for Microsoft Windows `are also available
146 <https://www.orthanc-server.com/browse.php?path=/plugin-python>`__. 146 <https://www.orthanc-server.com/browse.php?path=/plugin-python>`__.
147 147
148 Beware that one version of the Python plugin can only be run against 148 Beware that one version of the Python plugin can only be run against
149 one version of the Python interpreter. This version is clearly 149 one version of the Python interpreter. This version is clearly
150 indicated in the name of the folder. 150 indicated in the filename of the precompiled binaries.
151
152 As of release 1.0, the Orthanc project only provides pre-compiled
153 binaries for Microsoft Windows 32bit and Python 2.7. Even though this
154 version of Python is not supported anymore, it can still run on all
155 the versions of Microsoft Windows that have been released for more
156 than 10 years.
157 151
158 .. highlight:: text 152 .. highlight:: text
159 153
160 You are of course free to compile the plugin from sources if you need 154 You are of course free to compile the plugin from sources. You'll have
161 a more recent version. You'll have to explicitly specify the path to 155 to explicitly specify the path to your Python installation while
162 your Python installation while invoking CMake. For instance:: 156 invoking CMake. For instance::
163 157
164 C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=2.7 -DPYTHON_WINDOWS_ROOT=C:/Python27 \ 158 C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=2.7 -DPYTHON_WINDOWS_ROOT=C:/Python27 \
165 -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 15 2017" 159 -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 15 2017"
166 160
167 **Note about debug builds**: usually, building Python modules such as the Python 161 **Note about debug builds**: Usually, building Python modules such as the Python
168 plugin for Orthanc in debug mode (where ``_DEBUG`` is defined) leads to a module 162 plugin for Orthanc in debug mode (where ``_DEBUG`` is defined) leads to a module
169 (.exe or .dll) that requires a debug build of Python, and debug versions of all 163 (``.exe`` or ``.dll``) that requires a debug build of Python, and debug versions of all
170 the Python libraries. This is quite cumbersome, for it requires building Python 164 the Python libraries. This is quite cumbersome, for it requires building Python
171 on your own or downloading additional debug files. 165 on your own or downloading additional debug files.
172 166
173 Since using a debug build of Python is only necessary in very specific cases 167 Since using a debug build of Python is only necessary in very specific cases
174 (such as the debugging of code at the boundary between Python and an extension), 168 (such as the debugging of code at the boundary between Python and an extension),
186 -DSTATIC_BUILD=ON -DPYTHON_WINDOWS_USE_RELEASE_LIBS=OFF \ 180 -DSTATIC_BUILD=ON -DPYTHON_WINDOWS_USE_RELEASE_LIBS=OFF \
187 -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 15 2017" 181 -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 15 2017"
188 182
189 Please note that this CMake option only impacts **debug** builds under Windows, 183 Please note that this CMake option only impacts **debug** builds under Windows,
190 when using (any version of) the Microsoft Visual Studio compiler. 184 when using (any version of) the Microsoft Visual Studio compiler.
185
186 The precompiled binaries all use release (i.e. non-debug) versions of Python.
187
191 188
192 Configuration options 189 Configuration options
193 --------------------- 190 ---------------------
194 191
195 The only two configuration options that are available for this plugin 192 The only two configuration options that are available for this plugin