174 lines
8.9 KiB
HTML
174 lines
8.9 KiB
HTML
|
||
|
||
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" data-content_root="../">
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Python library — python-archinstall v2.3.0 documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=7ab3649f" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=4ae1632d" />
|
||
|
||
|
||
<script src="../_static/jquery.js?v=5d32c60e"></script>
|
||
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||
<script src="../_static/documentation_options.js?v=387c4177"></script>
|
||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||
<script src="../_static/js/theme.js"></script>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="Python module" href="../examples/python.html" />
|
||
<link rel="prev" title="Discord" href="../help/discord.html" />
|
||
<link href="../_static/style.css" rel="stylesheet" type="text/css">
|
||
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="../index.html" class="icon icon-home">
|
||
python-archinstall
|
||
<img src="../_static/logo.png" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<p class="caption" role="heading"><span class="caption-text">Running Archinstall</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="guided.html">Guided installation</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Getting help</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../help/known_issues.html">Known Issues</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../help/report_bug.html">Report Issues & Bugs</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../help/discord.html">Discord</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Archinstall as a library</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python library</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="#installing-with-pacman">Installing with pacman</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#installing-from-pypi">Installing from PyPI</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#install-using-source-code">Install using source code</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../examples/python.html">Python module</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../archinstall/plugins.html">Python Plugins</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../archinstall/Installer.html">archinstall.Installer</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="../index.html">python-archinstall</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item active">Python library</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<section id="python-library">
|
||
<span id="installing-python"></span><h1>Python library<a class="headerlink" href="#python-library" title="Link to this heading"></a></h1>
|
||
<p>Archinstall ships on <a class="reference external" href="https://pypi.org/">PyPi</a> as <a class="reference external" href="pypi.org/project/archinstall/">archinstall</a>.
|
||
But the library can be installed manually as well.</p>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Warning</p>
|
||
<p>These steps are not required if you want to use archinstall on the official Arch Linux ISO.</p>
|
||
</div>
|
||
<section id="installing-with-pacman">
|
||
<h2>Installing with pacman<a class="headerlink" href="#installing-with-pacman" title="Link to this heading"></a></h2>
|
||
<p>Archinstall is on the <a class="reference external" href="https://wiki.archlinux.org/index.php/Official_repositories">official repositories</a>.
|
||
And it will also install archinstall as a python library.</p>
|
||
<p>To install both the library and the archinstall script:</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">pacman -S archinstall</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Alternatively, you can install only the library and not the helper executable using the <code class="docutils literal notranslate"><span class="pre">python-archinstall</span></code> package.</p>
|
||
</section>
|
||
<section id="installing-from-pypi">
|
||
<h2>Installing from PyPI<a class="headerlink" href="#installing-from-pypi" title="Link to this heading"></a></h2>
|
||
<p>The basic concept of PyPI applies using <cite>pip</cite>.</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">pip install archinstall</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
<section id="install-using-source-code">
|
||
<span id="installing-python-manual"></span><h2>Install using source code<a class="headerlink" href="#install-using-source-code" title="Link to this heading"></a></h2>
|
||
<p>You can also install using the source code.
|
||
For sake of simplicity we will use <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span></code> in this example.</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">git clone https://github.com/archlinux/archinstall</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>You can either move the folder into your project and simply do</p>
|
||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">archinstall</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Or you can PyPa’s <a class="reference external" href="https://github.com/pypa/build">build</a> and <a class="reference external" href="https://github.com/pypa/installer">installer</a> to install it into pythons module path.</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>archinstall
|
||
<span class="gp">$ </span>python<span class="w"> </span>-m<span class="w"> </span>build<span class="w"> </span>.
|
||
<span class="gp">$ </span>python<span class="w"> </span>-m<span class="w"> </span>installer<span class="w"> </span>dist/*.whl
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="../help/discord.html" class="btn btn-neutral float-left" title="Discord" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="../examples/python.html" class="btn btn-neutral float-right" title="Python module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2022, Anton Hvornum.</p>
|
||
</div>
|
||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |