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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Compiling pyo from sources — Pyo 1.0.5 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/agogo.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-codeautolink.css" />
<link rel="stylesheet" type="text/css" href="_static/autoclasstoc.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/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="shortcut icon" href="_static/E-PyoIcon.ico"/>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Structure of the library" href="structure.html" />
<link rel="prev" title="Installing pyo with pip" href="download.html" />
</head><body>
<div class="header-wrapper" role="banner">
<div class="header">
<div class="headertitle"><a
href="index.html">Pyo 1.0.5 documentation</a></div>
<div class="rel" role="navigation" aria-label="related navigation">
<a href="download.html" title="Installing pyo with pip"
accesskey="P">previous</a> |
<a href="structure.html" title="Structure of the library"
accesskey="N">next</a> |
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
</div>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div class="sidebar">
<h3>Table of Contents</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="about.html">About pyo</a></li>
<li class="toctree-l1"><a class="reference internal" href="download.html">Installing pyo with pip</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Compiling pyo from sources</a></li>
<li class="toctree-l1"><a class="reference internal" href="structure.html">Structure of the library</a></li>
<li class="toctree-l1"><a class="reference internal" href="gettingstarted.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="winaudioinspect.html">Configuring the audio output (Windows)</a></li>
<li class="toctree-l1"><a class="reference internal" href="perftips.html">Improve performance of pyo programs</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="api/index.html">API documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples/index.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/index.html">Advanced tutorials</a></li>
</ul>
<div role="search">
<h3 style="margin-top: 1.5em;">Search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="compiling-pyo-from-sources">
<h1>Compiling pyo from sources<a class="headerlink" href="#compiling-pyo-from-sources" title="Permalink to this heading">¶</a></h1>
<p>Here is how you can compile pyo from sources on Linux and MacOS (if you are
interested in the adventure of compiling pyo from sources on Windows, you can
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>
<p>See below for complete build routines for Debian/Ubuntu and MacOS.</p>
<section id="dependencies">
<h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this heading">¶</a></h2>
<p>To compile pyo with all its features, you will need the following dependencies:</p>
<ul class="simple">
<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>
<li><p><a class="reference external" href="https://www.wxpython.org/pages/downloads/">WxPython Phoenix 4.2.0 or higher</a></p></li>
<li><p><a class="reference external" href="http://www.portaudio.com/">Portaudio</a></p></li>
<li><p><a class="reference external" href="http://portmedia.sourceforge.net/portmidi/">Portmidi</a></p></li>
<li><p><a class="reference external" href="http://www.mega-nerd.com/libsndfile/">libsndfile</a></p></li>
<li><p><a class="reference external" href="http://liblo.sourceforge.net/">liblo</a></p></li>
<li><p><a class="reference external" href="https://git-scm.com/">git</a> (if you want the latest sources)</p></li>
</ul>
<p>Please note that under MacOS you will need to install the
<strong>Apple’s developer tools</strong> to compile pyo.</p>
</section>
<section id="getting-sources">
<h2>Getting sources<a class="headerlink" href="#getting-sources" title="Permalink to this heading">¶</a></h2>
<p>You can download pyo’s sources by checking out the source code
<a class="reference external" href="https://github.com/belangeo/pyo">here</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/belangeo/pyo.git
</pre></div>
</div>
</section>
<section id="compilation">
<h2>Compilation<a class="headerlink" href="#compilation" title="Permalink to this heading">¶</a></h2>
<p>Once you have all the required dependencies, go in pyo’s directory:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> path/to/pyo
</pre></div>
</div>
<p>And build the library:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo python setup.py install
</pre></div>
</div>
<p>You can customize your compilation by giving some flags to the command line.</p>
<section id="compilation-flags">
<span id="compilation-flags-label"></span><h3>Compilation flags<a class="headerlink" href="#compilation-flags" title="Permalink to this heading">¶</a></h3>
<p>If you want to be able to use coreaudio (MacOS):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--use-coreaudio
</pre></div>
</div>
<p>If you want JACK support (Linux, MacOS):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--use-jack
</pre></div>
</div>
<p>If you want to be able to use a 64-bit pyo (All platforms, this is the sample
resolution, not the architecture), this will build both single and double
precisions:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--use-double
</pre></div>
</div>
<p>If you want to disable most of messages printed to the console:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--no-messages
</pre></div>
</div>
<p>If you want to compile external classes defined in pyo/externals folder:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--compile-externals
</pre></div>
</div>
<p>By default, debug symbols are off. If you want to compile pyo with debug symbols:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--debug
</pre></div>
</div>
<p>By default, optimizations are activated. If you want to compile pyo without
optimizations:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--fast-compile
</pre></div>
</div>
<p>If you want to compile pyo with minimal dependencies (mostly for integrated use
in a host environment):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>--minimal
</pre></div>
</div>
<p>This will compile pyo without portaudio, portmidi and liblo support.</p>
</section>
<section id="compilation-scripts">
<h3>Compilation scripts<a class="headerlink" href="#compilation-scripts" title="Permalink to this heading">¶</a></h3>
<p>In the ./scripts folder, there is some alternate scripts to simplify the
compilation process a little bit. These scripts will compile pyo for the
version of python pointed to by the command <cite>python</cite>.</p>
<p>To compile both 32-bit and 64-bit resolutions on linux with jack support:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo sh scripts/compile_linux_withJack.sh
</pre></div>
</div>
<p>To compile both 32-bit and 64-bit resolutions on macOS without Jack support:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo sh scripts/compile_OSX.sh
</pre></div>
</div>
<p>To compile both 32-bit and 64-bit resolutions on macOS with Jack support (Jack headers must be present on the system):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo sh scripts/compile_OSX_withJack.sh
</pre></div>
</div>
</section>
</section>
<section id="debian-ubuntu-apt-get">
<h2>Debian & Ubuntu (apt-get)<a class="headerlink" href="#debian-ubuntu-apt-get" title="Permalink to this heading">¶</a></h2>
<p>Under Debian & Ubuntu you can type the following commands to get pyo up and running.</p>
<section id="for-python-3-7-and-higher">
<h3>For Python 3.7 and higher<a class="headerlink" href="#for-python-3-7-and-higher" title="Permalink to this heading">¶</a></h3>
<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
sudo apt-get install python3-dev python3-tk python3-pil.imagetk python3-pip
git clone https://github.com/belangeo/pyo.git
<span class="nb">cd</span> pyo
sudo python3 setup.py install --use-jack --use-double
</pre></div>
</div>
<p>If you want to be able to use all of pyo’s gui widgets, you will need wxPython Phoenix 4.2.0.</p>
<ul class="simple">
<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>
</ul>
</section>
</section>
<section id="macos-homebrew">
<h2>MacOS (Homebrew)<a class="headerlink" href="#macos-homebrew" title="Permalink to this heading">¶</a></h2>
<p>Under macOS, it is very simple to build pyo from sources with the Homebrew
package manager.</p>
<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>
<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>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --user wxPython
</pre></div>
</div>
<p>The third step is to install <a class="reference external" href="http://brew.sh/">Homebrew</a>.</p>
<p>Finally, in a terminal window, install pyo’s dependencies, clone and build pyo:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew install liblo libsndfile portaudio portmidi
git clone https://github.com/belangeo/pyo.git
<span class="nb">cd</span> pyo
python setup.py install --use-coreaudio --use-double
</pre></div>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="footer-wrapper">
<div class="footer">
<div class="left">
<div role="navigation" aria-label="related navigaton">
<a href="download.html" title="Installing pyo with pip"
>previous</a> |
<a href="structure.html" title="Structure of the library"
>next</a> |
<a href="genindex.html" title="General Index"
>index</a>
</div>
<div role="note" aria-label="source link">
</div>
</div>
<div class="right">
<div class="footer" role="contentinfo">
© Copyright 2021, Olivier Bélanger.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</body>
</html>
|