Skip to content

Commit e001cc0

Browse files
Shashank Kumargitmate-bot
authored andcommitted
Install.rst: Adding pipenv support
Pipenv support is added for coala installation for Linux, Mac and Windows. However, Pipfile is not supported natively yet. It helps manage pip and virtualenv together. Pipenv generated Pipfile and Pipfile.lock for it's functioning and will be updated by pipenv itself on every install and update of packages, this is the reason these 2 files are needed to be ignored inside .gitignore. Closes #502
1 parent f446b98 commit e001cc0

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ venv/
2525
*.egg-info/
2626
.installed.cfg
2727
*.egg
28+
Pipfile
29+
Pipfile.lock
2830

2931
# PyInstaller
3032
# Usually these files are written by a python script from a template

Users/Install.rst

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,52 @@ To install coala only (without any bears), you can do:
8383
**Ubuntu Users** - Do not use ``apt-get install coala``
8484
for installing coala as that is different software.
8585

86+
Installing inside a pipenv
87+
~~~~~~~~~~~~~~~~~~~~~~~~~~
88+
89+
Pipenv is a user-friendly method of managing virtual environments and
90+
packages.
91+
You can look at it as a mix of ``pip`` and ``virtualenv``, so you don't have
92+
to manage them seperately for your projects.
93+
94+
We'll now install ``pipenv`` by running the following command::
95+
96+
$ pip3 install pipenv
97+
98+
Now we create a Python 3 environment for the project. Move to your project
99+
directory and run the following command::
100+
101+
$ pipenv --three
102+
103+
The above command will create a virtual environment isolated from your system
104+
global installation.
105+
106+
To install coala and all bears, run the following command::
107+
108+
$ pipenv install coala-bears
109+
110+
Great, you have now setup a pipenv environment for your project directory and
111+
installed coala using it.
112+
You can now activate the pipenv by running::
113+
114+
$ pipenv shell
115+
116+
Your virtual environment (virtualenv) is now active. You'll notice the change
117+
before the ``$`` sign on the command-line which will have your project
118+
directory name and some alpha-numeric value to make it unique.
119+
You can use coala by running the ``coala`` command and exit the virtualenv
120+
environment by entering ``exit`` at any time.
121+
122+
You can read more about `pipenv <https://docs.pipenv.org>`_ in its
123+
documentation.
124+
86125
Installing inside a virtualenv
87126
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88127

89-
Virtualenv is probably what you want to use during development.
128+
Although ``pipenv`` sorts all your package and virtual environment needs, if
129+
you still feel the need to use ``virtualenv`` separately you can follow the
130+
steps given below.
131+
90132
You can read more about
91133
it at the `virtualenv documentation <http://virtualenv.readthedocs.org>`_.
92134

0 commit comments

Comments
 (0)