{"id":16,"date":"2011-08-30T14:54:26","date_gmt":"2011-08-30T19:54:26","guid":{"rendered":"http:\/\/codezen.org\/canto-new\/?page_id=16"},"modified":"2020-12-03T11:27:58","modified_gmt":"2020-12-03T17:27:58","slug":"source","status":"publish","type":"page","link":"https:\/\/codezen.org\/canto-ng\/source\/","title":{"rendered":"Get Canto"},"content":{"rendered":"<div id='toc'>\n<ul><li><a href=\"#DebianUbuntu-out-of-date\">Debian\/Ubuntu [out of date]<\/a><\/li>\n<li><a href=\"#Gentoo\">Gentoo<\/a><\/li>\n<li><a href=\"#Arch\">Arch<\/a><\/li>\n<li><a href=\"#NixOS\">NixOS<\/a><\/li>\n<li><a href=\"#Tarballs\">Tarballs<\/a><\/li>\n<li><a href=\"#Git\">Git<\/a><\/li>\n<li><a href=\"#Installation-from-Source\">Installation from Source<\/a><\/li>\n<li><a href=\"#Installation-from-Source-no-root-access\">Installation from Source (no root access)<\/a><\/li>\n<\/ul><\/li><\/ul>\n<\/div>\n<h3 id='DebianUbuntu-out-of-date'>Debian\/Ubuntu [out of date]<\/h3>\n<hr>\n<p>Debian (sid) and Ubuntu (trusty, xenial through zesty) running AMD64 can add the following line to their sources.list to get canto. If there is demand for i386, I can start to generate for them as well (unfortunately the curses C extension is architecture dependent).<\/p>\n<blockquote><p>deb http:\/\/codezen.org\/debian [sid|trusty|xenial|yakkety|zesty] main<\/p><\/blockquote>\n<p>That repo is signed with a key you can add:<\/p>\n<pre>curl https:\/\/codezen.org\/static\/canto-pub.gpg | sudo apt-key add -<\/pre>\n<p>After you&#8217;ve added the repo and key, just <code>apt-get update<\/code> and then install <code>python3-canto-curses<\/code>.<\/p>\n<h3 id='Gentoo'>Gentoo<\/h3>\n<hr>\n<p>Gentoo has native packages, <em>canto-daemon<\/em> and <em>canto-curses<\/em>. Latest version isn&#8217;t guaranteed however.<\/p>\n<h3 id='Arch'>Arch<\/h3>\n<hr>\n<p>Arch has native packages, <em>canto-daemon<\/em> and <em>canto-curses<\/em> in the community repo.<\/p>\n<p>Git variants are also available in the AUR.<\/p>\n<h3 id='NixOS'>NixOS<\/h3>\n<hr>\n<p>NixOS has native packages, <em>canto-daemon<\/em> and <em>canto-curses<\/em>.<\/p>\n<h3 id='Tarballs'>Tarballs<\/h3>\n<hr>\n<p>The latest release can be downloaded (.tar.gz) here:<\/p>\n<p><a href=\"https:\/\/github.com\/themoken\/canto-next\/releases\/tag\/v0.9.8\">daemon 0.9.8<\/a><br \/>\n<a href=\"https:\/\/github.com\/themoken\/canto-curses\/releases\/tag\/v0.9.9\">curses 0.9.9<\/a><\/p>\n<p>Tag snapshots for older releases are also listed.<\/p>\n<p><a href=\"https:\/\/github.com\/themoken\/canto-next\/tags\">daemon<\/a><br \/>\n<a href=\"https:\/\/github.com\/themoken\/canto-curses\/tags\">curses<\/a><\/p>\n<h3 id='Git'>Git<\/h3>\n<hr>\n<p>The source for Canto is available on Github:<\/p>\n<p><a href=\"https:\/\/github.com\/themoken\/canto-next\">canto-next<\/a><br \/>\n<a href=\"https:\/\/github.com\/themoken\/canto-curses\">canto-curses<\/a><\/p>\n<h3 id='Installation-from-Source'>Installation from Source<\/h3>\n<hr>\n<p>Installation of canto is quite simple and follows the standard paradigm for Python packages.<\/p>\n<h4 id='Dependencies'>Dependencies<\/h4>\n<hr>\n<p>daemon:<\/p>\n<hr>\n<ul>\n<li>Python 3<\/li>\n<li>Python 3 &#8211; feedparser<\/li>\n<\/ul>\n<p>curses:<\/p>\n<hr>\n<p>Runtime<\/p>\n<ul>\n<li>Python 3<\/li>\n<li>readline<\/li>\n<li>ncurses<strong>w<\/strong><\/li>\n<\/ul>\n<p>Build (on distros with separate dev header packages)<\/p>\n<ul>\n<li>python3-dev<\/li>\n<li>libreadline6-dev<\/li>\n<li>libncurses5-dev<\/li>\n<li>libncursesw5-dev<\/li>\n<li>Standard build tools (build-essential, GCC, etc.)<\/li>\n<\/ul>\n<h4 id='Git-Install'>Git Install<\/h4>\n<hr>\n<ol>\n<li>git clone https:\/\/github.com\/themoken\/canto-next.git<\/li>\n<li>cd canto-next<\/li>\n<li>sudo python3 setup.py install<\/li>\n<li>cd ..\/<\/li>\n<li>git clone https:\/\/github.com\/themoken\/canto-curses.git<\/li>\n<li>cd canto-curses<\/li>\n<li>sudo python3 setup.py install<\/li>\n<\/ol>\n<h4 id='Tarball-Install'>Tarball Install<\/h4>\n<hr>\n<ol>\n<li>download or wget [canto-next tarball]<\/li>\n<li>tar -xvzf canto-next-[version].tar.gz<\/li>\n<li>cd canto-next-[version]<\/li>\n<li>sudo python3 setup.py install<\/li>\n<li>cd ..\/<\/li>\n<li>download or wget [canto-curses tarball]<\/li>\n<li>tar -xvzf canto-curses-[version].tar.gz<\/li>\n<li>cd canto-curses-[version]<\/li>\n<li>sudo python3 setup.py install<\/li>\n<\/ol>\n<h3 id='Installation-from-Source-no-root-access'>Installation from Source (no root access)<\/h3>\n<p><strong>This assumes that you have Python 3 installed already. If not, then getting a working Python 3 installation is step one. This is beyond the scope of this little walkthrough, but the <a href=\"https:\/\/docs.python.org\/3\/using\/unix.html#on-linux\">official Python 3 docs<\/a> and Google should be helpful.<\/strong><\/p>\n<p>Python has good support for installation to user directories via <code>setup.py<\/code>.<\/p>\n<p>Using <code>python3 setup.py install --prefix=\/path\/to\/some\/directory<\/code> you can install a Python package into a custom directory.<\/p>\n<p>You still need all of the dependencies available, they&#8217;re listed in the previous section.<\/p>\n<p>Build dependencies can be a bit tricky without root access. Requiring compilers and headers on something like a shared host can be a pain. Fortunately, if you do have access to a machine with the same architecture as your host (like your laptop or desktop) running Linux, you can do the installation step on your machine and then copy your custom root directory wherever you need.<\/p>\n<h4 id='Install-canto-to-a-custom-directory'>Install canto to a custom directory<\/h4>\n<p>It may seem odd to install canto <em>before<\/em> its runtime dependencies, but canto&#8217;s setup.py is simple enough to create a directory hierarchy at the prefix, even if one doesn&#8217;t exist, where feedparser will fail unless there&#8217;s already a hierarchy in place.<\/p>\n<p>Here&#8217;s the rootless install for installing to <code>~\/canto-root<\/code>:<\/p>\n<ol>\n<li>git clone https:\/\/github.com\/themoken\/canto-next.git<\/li>\n<li>cd canto-next<\/li>\n<li><code>python3 setup.py install --prefix=~\/canto-root<\/code><\/li>\n<li>cd ..\/<\/li>\n<li>git clone https:\/\/github.com\/themoken\/canto-curses.git<\/li>\n<li>cd canto-curses<\/li>\n<li><code>python3 setup.py install --prefix=~\/canto-root<\/code><\/li>\n<\/ol>\n<h4 id='Install-runtime-dependencies-to-a-custom-directory'>Install runtime dependencies to a custom directory<\/h4>\n<p>For the runtime dependencies, ncursesw and readline are usually non-issues (they are usually pulled in by base packages on most distros).<\/p>\n<p>For Feedparser, you can <a href=\"https:\/\/github.com\/kurtmckee\/feedparser\">download from github<\/a> and install with setup.py, just like Canto. It is a little pickier about your installation target being in your <code>PYTHONPATH<\/code> already.<\/p>\n<p>NOTE: The <code>PYTHONPATH<\/code> change includes the Python version, you&#8217;ll have to change it (or just tab complete it since the directory should&#8217;ve been created by the Canto install).<\/p>\n<ol>\n<li>mkdir ~\/canto-root<\/li>\n<li>git clone https:\/\/github.com\/kurtmckee\/feedparser.git<\/li>\n<li>cd feedparser<\/li>\n<li>export PYTHONPATH=&#8221;\/path\/to\/canto-root\/lib\/python3.<strong>X<\/strong>\/site-packages\/:$PYTHONPATH&#8221;<\/li>\n<li><code>python3 setup.py install --prefix=~\/canto-root<\/code><\/li>\n<\/ol>\n<p>Now <code>~\/canto-root<\/code> has a full install of Canto and can be moved around if you need to.<\/p>\n<h4 id='Running-Canto-out-of-the-custom-directory'>Running Canto out of the custom directory<\/h4>\n<p>In your shell setup (like <code>.bashrc<\/code>) or in your terminal \/ script add the following:<br \/>\n<code><br \/>\nexport PATH=\"\/path\/to\/canto-root\/bin:$PATH\"<br \/>\nexport PYTHONPATH=\"\/path\/to\/canto-root\/lib\/python3.[X]\/site-packages:$PYTHONPATH\"<br \/>\n<\/code><\/p>\n<p>Once again, note that <code>PYTHONPATH<\/code> has a version in it that you&#8217;ll have to change to be appropriate for your install.<\/p>\n<p>This should allow you to run canto-daemon, canto-curses, and canto-remote as usual.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian\/Ubuntu [out of date] Debian (sid) and Ubuntu (trusty, xenial through zesty) running AMD64 can add the following line to their sources.list to get canto. If there is demand for i386, I can start to generate for them as well (unfortunately the curses C extension is architecture dependent). deb http:\/\/codezen.org\/debian [sid|trusty|xenial|yakkety|zesty] main That repo is <a class=\"read-more\" href=\"https:\/\/codezen.org\/canto-ng\/source\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":6,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/pages\/16"}],"collection":[{"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":45,"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/pages\/16\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/pages\/16\/revisions\/600"}],"wp:attachment":[{"href":"https:\/\/codezen.org\/canto-ng\/wp-json\/wp\/v2\/media?parent=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}