Debian Codegraph @

docs/compiling.html

raw
1
2 <!DOCTYPE html>
3
4 <html lang="en">
5 <head>
6 <meta charset="utf-8" />
7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
8
9 <title>Compiling pyo from sources &#8212; Pyo 1.0.5 documentation</title>
10 <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
11 <link rel="stylesheet" type="text/css" href="_static/agogo.css" />
12 <link rel="stylesheet" type="text/css" href="_static/sphinx-codeautolink.css" />
13 <link rel="stylesheet" type="text/css" href="_static/autoclasstoc.css" />
14 <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
15 <script src="_static/jquery.js"></script>
16 <script src="_static/underscore.js"></script>
17 <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
18 <script src="_static/doctools.js"></script>
19 <script src="_static/sphinx_highlight.js"></script>
20 <link rel="shortcut icon" href="_static/E-PyoIcon.ico"/>
21 <link rel="author" title="About these documents" href="about.html" />
22 <link rel="index" title="Index" href="genindex.html" />
23 <link rel="search" title="Search" href="search.html" />
24 <link rel="next" title="Structure of the library" href="structure.html" />
25 <link rel="prev" title="Installing pyo with pip" href="download.html" />
26 </head><body>
27 <div class="header-wrapper" role="banner">
28 <div class="header">
29 <div class="headertitle"><a
30 href="index.html">Pyo 1.0.5 documentation</a></div>
31 <div class="rel" role="navigation" aria-label="related navigation">
32 <a href="download.html" title="Installing pyo with pip"
33 accesskey="P">previous</a> |
34 <a href="structure.html" title="Structure of the library"
35 accesskey="N">next</a> |
36 <a href="genindex.html" title="General Index"
37 accesskey="I">index</a>
38 </div>
39 </div>
40 </div>
41
42 <div class="content-wrapper">
43 <div class="content">
44 <div class="sidebar">
45
46 <h3>Table of Contents</h3>
47 <ul class="current">
48 <li class="toctree-l1"><a class="reference internal" href="about.html">About pyo</a></li>
49 <li class="toctree-l1"><a class="reference internal" href="download.html">Installing pyo with pip</a></li>
50 <li class="toctree-l1 current"><a class="current reference internal" href="#">Compiling pyo from sources</a></li>
51 <li class="toctree-l1"><a class="reference internal" href="structure.html">Structure of the library</a></li>
52 <li class="toctree-l1"><a class="reference internal" href="gettingstarted.html">Getting started</a></li>
53 <li class="toctree-l1"><a class="reference internal" href="winaudioinspect.html">Configuring the audio output (Windows)</a></li>
54 <li class="toctree-l1"><a class="reference internal" href="perftips.html">Improve performance of pyo programs</a></li>
55 </ul>
56 <ul>
57 <li class="toctree-l1"><a class="reference internal" href="api/index.html">API documentation</a></li>
58 <li class="toctree-l1"><a class="reference internal" href="examples/index.html">Examples</a></li>
59 <li class="toctree-l1"><a class="reference internal" href="tutorials/index.html">Advanced tutorials</a></li>
60 </ul>
61
62 <div role="search">
63 <h3 style="margin-top: 1.5em;">Search</h3>
64 <form class="search" action="search.html" method="get">
65 <input type="text" name="q" />
66 <input type="submit" value="Go" />
67 </form>
68 </div>
69
70 </div>
71 <div class="document">
72
73 <div class="documentwrapper">
74 <div class="bodywrapper">
75 <div class="body" role="main">
76
77 <section id="compiling-pyo-from-sources">
78 <h1>Compiling pyo from sources<a class="headerlink" href="#compiling-pyo-from-sources" title="Permalink to this heading">¶</a></h1>
79 <p>Here is how you can compile pyo from sources on Linux and MacOS (if you are
80 interested in the adventure of compiling pyo from sources on Windows, you can
81 take a look at my personal notes in <a class="reference external" href="https://github.com/belangeo/pyo/blob/master/scripts/win/windows-10-64bit-build-routine.txt">windows-10-64bit-build-routine.txt</a>).</p>
82 <p>See below for complete build routines for Debian/Ubuntu and MacOS.</p>
83 <section id="dependencies">
84 <h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this heading">¶</a></h2>
85 <p>To compile pyo with all its features, you will need the following dependencies:</p>
86 <ul class="simple">
87 <li><p><a class="reference external" href="https://www.python.org/downloads/">Python 3.7, 3.8, 3.9, 3.10, or 3.11</a>.</p></li>
88 <li><p><a class="reference external" href="https://www.wxpython.org/pages/downloads/">WxPython Phoenix 4.2.0 or higher</a></p></li>
89 <li><p><a class="reference external" href="http://www.portaudio.com/">Portaudio</a></p></li>
90 <li><p><a class="reference external" href="http://portmedia.sourceforge.net/portmidi/">Portmidi</a></p></li>
91 <li><p><a class="reference external" href="http://www.mega-nerd.com/libsndfile/">libsndfile</a></p></li>
92 <li><p><a class="reference external" href="http://liblo.sourceforge.net/">liblo</a></p></li>
93 <li><p><a class="reference external" href="https://git-scm.com/">git</a> (if you want the latest sources)</p></li>
94 </ul>
95 <p>Please note that under MacOS you will need to install the
96 <strong>Apple’s developer tools</strong> to compile pyo.</p>
97 </section>
98 <section id="getting-sources">
99 <h2>Getting sources<a class="headerlink" href="#getting-sources" title="Permalink to this heading">¶</a></h2>
100 <p>You can download pyo’s sources by checking out the source code
101 <a class="reference external" href="https://github.com/belangeo/pyo">here</a>:</p>
102 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/belangeo/pyo.git
103 </pre></div>
104 </div>
105 </section>
106 <section id="compilation">
107 <h2>Compilation<a class="headerlink" href="#compilation" title="Permalink to this heading">¶</a></h2>
108 <p>Once you have all the required dependencies, go in pyo’s directory:</p>
109 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> path/to/pyo
110 </pre></div>
111 </div>
112 <p>And build the library:</p>
113 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo python setup.py install
114 </pre></div>
115 </div>
116 <p>You can customize your compilation by giving some flags to the command line.</p>
117 <section id="compilation-flags">
118 <span id="compilation-flags-label"></span><h3>Compilation flags<a class="headerlink" href="#compilation-flags" title="Permalink to this heading">¶</a></h3>
119 <p>If you want to be able to use coreaudio (MacOS):</p>
120 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--use-coreaudio
121 </pre></div>
122 </div>
123 <p>If you want JACK support (Linux, MacOS):</p>
124 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--use-jack
125 </pre></div>
126 </div>
127 <p>If you want to be able to use a 64-bit pyo (All platforms, this is the sample
128 resolution, not the architecture), this will build both single and double
129 precisions:</p>
130 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--use-double
131 </pre></div>
132 </div>
133 <p>If you want to disable most of messages printed to the console:</p>
134 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--no-messages
135 </pre></div>
136 </div>
137 <p>If you want to compile external classes defined in pyo/externals folder:</p>
138 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--compile-externals
139 </pre></div>
140 </div>
141 <p>By default, debug symbols are off. If you want to compile pyo with debug symbols:</p>
142 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--debug
143 </pre></div>
144 </div>
145 <p>By default, optimizations are activated. If you want to compile pyo without
146 optimizations:</p>
147 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--fast-compile
148 </pre></div>
149 </div>
150 <p>If you want to compile pyo with minimal dependencies (mostly for integrated use
151 in a host environment):</p>
152 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--minimal
153 </pre></div>
154 </div>
155 <p>This will compile pyo without portaudio, portmidi and liblo support.</p>
156 </section>
157 <section id="compilation-scripts">
158 <h3>Compilation scripts<a class="headerlink" href="#compilation-scripts" title="Permalink to this heading">¶</a></h3>
159 <p>In the ./scripts folder, there is some alternate scripts to simplify the
160 compilation process a little bit. These scripts will compile pyo for the
161 version of python pointed to by the command <cite>python</cite>.</p>
162 <p>To compile both 32-bit and 64-bit resolutions on linux with jack support:</p>
163 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo sh scripts/compile_linux_withJack.sh
164 </pre></div>
165 </div>
166 <p>To compile both 32-bit and 64-bit resolutions on macOS without Jack support:</p>
167 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo sh scripts/compile_OSX.sh
168 </pre></div>
169 </div>
170 <p>To compile both 32-bit and 64-bit resolutions on macOS with Jack support (Jack headers must be present on the system):</p>
171 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo sh scripts/compile_OSX_withJack.sh
172 </pre></div>
173 </div>
174 </section>
175 </section>
176 <section id="debian-ubuntu-apt-get">
177 <h2>Debian &amp; Ubuntu (apt-get)<a class="headerlink" href="#debian-ubuntu-apt-get" title="Permalink to this heading">¶</a></h2>
178 <p>Under Debian &amp; Ubuntu you can type the following commands to get pyo up and running.</p>
179 <section id="for-python-3-7-and-higher">
180 <h3>For Python 3.7 and higher<a class="headerlink" href="#for-python-3-7-and-higher" title="Permalink to this heading">¶</a></h3>
181 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo apt-get install libjack-jackd2-dev libportmidi-dev portaudio19-dev liblo-dev libsndfile-dev
182 sudo apt-get install python3-dev python3-tk python3-pil.imagetk python3-pip
183 git clone https://github.com/belangeo/pyo.git
184 <span class="nb">cd</span> pyo
185 sudo python3 setup.py install --use-jack --use-double
186 </pre></div>
187 </div>
188 <p>If you want to be able to use all of pyo’s gui widgets, you will need wxPython Phoenix 4.2.0.</p>
189 <ul class="simple">
190 <li><p>To install wxPython with pip on linux, follow the instructions on the wxPython’s <a class="reference external" href="https://wxpython.org/pages/downloads/">downloads</a> page.</p></li>
191 </ul>
192 </section>
193 </section>
194 <section id="macos-homebrew">
195 <h2>MacOS (Homebrew)<a class="headerlink" href="#macos-homebrew" title="Permalink to this heading">¶</a></h2>
196 <p>Under macOS, it is very simple to build pyo from sources with the Homebrew
197 package manager.</p>
198 <p>The first step is to install the official Python from <a class="reference external" href="https://www.python.org/downloads/">python.org</a>.</p>
199 <p>Second step, if you want to be able to use all of pyo’s gui widgets, you will need wxPython Phoenix. Install with pip:</p>
200 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --user wxPython
201 </pre></div>
202 </div>
203 <p>The third step is to install <a class="reference external" href="http://brew.sh/">Homebrew</a>.</p>
204 <p>Finally, in a terminal window, install pyo’s dependencies, clone and build pyo:</p>
205 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew install liblo libsndfile portaudio portmidi
206 git clone https://github.com/belangeo/pyo.git
207 <span class="nb">cd</span> pyo
208 python setup.py install --use-coreaudio --use-double
209 </pre></div>
210 </div>
211 </section>
212 </section>
213
214
215 <div class="clearer"></div>
216 </div>
217 </div>
218 </div>
219 </div>
220 <div class="clearer"></div>
221 </div>
222 </div>
223
224 <div class="footer-wrapper">
225 <div class="footer">
226 <div class="left">
227 <div role="navigation" aria-label="related navigaton">
228 <a href="download.html" title="Installing pyo with pip"
229 >previous</a> |
230 <a href="structure.html" title="Structure of the library"
231 >next</a> |
232 <a href="genindex.html" title="General Index"
233 >index</a>
234 </div>
235 <div role="note" aria-label="source link">
236 </div>
237 </div>
238
239 <div class="right">
240
241 <div class="footer" role="contentinfo">
242 &#169; Copyright 2021, Olivier Bélanger.
243 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
244 </div>
245 </div>
246 <div class="clearer"></div>
247 </div>
248 </div>
249
250 </body>
251 </html>