Browse files

Improved the build experience

Better documentation and better requirements handling should help people
who want to build this from source.  This is to address #34
  • Loading branch information...
Dorthu committed Jul 3, 2018
1 parent a50859c commit e0c5fce13496ef8198576af7a424e3f928d249fb
Showing with 42 additions and 1 deletion.
  1. +4 −0 Makefile
  2. +33 −1 README.rst
  3. +5 −0 requirements.txt
@@ -21,3 +21,7 @@ common:
python3 -m linodecli bake ${SPEC} --skip-config
cp data-2 linodecli/
cp data-3 linodecli/
pip install -r requirements.txt
pip3 install -r requirements.txt
@@ -16,7 +16,10 @@ From source::
cd linode-cli
make install SPEC=
This will need to be repeated on each pull.
This will need to be repeated on each pull. For a build to succeed, see
`Building from Source`_ below.
.. _Building from Source: #building-from-source
@@ -166,6 +169,35 @@ your JSON output. If you want your JSON pretty-printed, we can do that too::
linode-cli linodes list --json --pretty --all
Building from Source
In order to successfully build the CLI, your system will require the following:
* The ``make`` command
* ``python`` and ``python3`` (both versions are required to build a package)
* ``pip`` and ``pip3`` (to install ``requirements.txt`` for both python versions)
Before attempting a build, install python dependencies like this::
make requirements
Once everything is set up, you can initiate a build like so::
make build SPEC=
In this example, ``SPEC`` is being set to the public URL of Linode's OpenAPI
specification. This can be replaced with a local version of the spec, and the
URL replaces with a path to the spec file, if desired.
To install the package as part of the build process, use this command::
make install SPEC= PYTHON=3
When using ``install``, the ``PYCMD`` argument is optional - if provided, it
will install the CLI for that version of python. Valid values are ``2`` and
``3``, and it will default to ``3``.
@@ -0,0 +1,5 @@

0 comments on commit e0c5fce

Please sign in to comment.