summaryrefslogtreecommitdiffstats
path: root/doc/source/install.rst
blob: 66ba91d50a91a1721f50fc15535495b87aa40f7f (plain)
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
Installation
============

.. image:: https://badge.fury.io/py/papis.svg
   :target: https://badge.fury.io/py/papis
.. image:: https://repology.org/badge/vertical-allrepos/papis.svg
   :target: https://repology.org/metapackage/papis

Using pip
---------

The easiest way of installing papis is using the ``PyPi`` repositories and
the package manager ``pip3``, just open a terminal and type in

::

  pip3 install papis

If you are on GNU/Linux like systems you might need to type ``sudo``

::

  sudo pip3 install papis

or if you prefer installing it locally then simply type

::

  pip3 install --user papis

You can also **update** papis with ``pip``

::

  pip3 install --upgrade papis


Archlinux
---------

- The package `papis` is also found in the archlinux repositories
  `here <https://aur.archlinux.org/packages/papis/>`_.
- If you want to use the git version of ``papis`` instead
  refer to `papis-git <https://aur.archlinux.org/packages/papis-git/>`_ package.
  Thanks `Julian <https://julianhauser.com/>`_!.

NixOS
-----

If you are running `NixOS <https://nixos.org/>`_ or you have the
`nix <https://nixos.org/nix/>`_ package manager installed, you can install
papis by running:

::

  nix-env -i papis

If you like papis, just clone the repository

::

  git clone git@github.com:papis/papis.git
  cd papis

and start hacking it with:

::

  nix-shell --expr 'with import <nixpkgs> {}; papis.overrideDerivation (drv: { src = ./.; })'

This command will provide you a shell with all the dependencies required.


From source
-----------

First of all you have to get the code, open a terminal and hit

::

  git clone https://github.com/papis/papis.git

or download the
`zip file <https://github.com/papis/papis/archive/master.zip>`_.


Go inside of the ``papis`` source folder and you can either use the ``Makefile``
or install it with ``python3``.

The general command that you have to hit is by using the ``setup.py`` script:

.. code:: python

  python3 setup.py install


Again, if you want to install it locally because you don't have administrative
rights on your computer you simply type

.. code:: python

  python3 setup.py install --user

If you want to work on the code, you can alternatively hit

.. code:: python

  python3 setup.py develop --user


.. warning::

  If you install the package locally, the program ``papis`` will be installed
  by default into your ``~/.local/bin`` directory, so that you will have to
  set your ``PATH`` accordingly.

  One way of doing this in ``bash`` shells (``Linux`` and the like, also
  ``Ubuntu`` on Windows or ``cygwin``) is by adding the following line to your
  ``~/.bashrc`` file
  ::

    export PATH=$PATH:$HOME/.local/bin


Requirements
------------

Papis needs the following packages that are sometimes not installed with the
system ``python3`` distribution

::

    python3-setuptools

However if you have a general enough python distribution they should be
installed.