.. highlight:: shell

============
Installation
============


Stable release
--------------

To install j-chess-lib, run this command in your terminal:

.. code-block:: console

    $ pip install j-chess-lib

or

.. code-block:: console

    $ pip install git+https://github.com/RedRem95/j-chess-lib.git

These are the preferred methods to install j-chess-lib, as it will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/


From sources
------------

The sources for j-chess-lib can be downloaded from the `Github repo`_.

You can either clone the public repository:

.. code-block:: console

    $ git clone git://github.com/RedRem95/j_chess_lib

Once you have a copy of the source, you can install it with:

.. code-block:: console

    $ pip install .

Or

.. code-block:: console

    $ python setup.py install

Both should fetch the needed schema from j-chess-xsd_ and build the sources from them.


.. _Github repo: https://github.com/RedRem95/j_chess_lib
.. _tarball: https://github.com/RedRem95/j_chess_lib/tarball/master
.. _j-chess-xsd: https://github.com/JoKrus/j-chess-xsd
