Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffd696e

Browse files
More H1/H2 fixes
Before, H1 and H2 formatting was not consistent. Now, H1 uses over/under hashes and H2 uses over/under asterisks. Also changed H3 tildes to equal signs to silence Sphinx warnings.
1 parent 33a6a10 commit ffd696e

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
lines changed

docs/dev/pip-virtualenv.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
.. _pip-virtualenv:
22

3+
###########################################
34
Further Configuration of Pip and Virtualenv
4-
===========================================
5+
###########################################
56

67
.. image:: /_static/photos/34018732105_f0e6758859_k_d.jpg
78

9+
10+
***************************************************
811
Requiring an active virtual environment for ``pip``
9-
---------------------------------------------------
12+
***************************************************
1013

1114
By now it should be clear that using virtual environments is a great way to
1215
keep your development environment clean and keeping different projects'
@@ -87,8 +90,10 @@ install packages globally by running ``gpip install``. You can change the name
8790
of the function to anything you like, just keep in mind that you will have to
8891
use that name when trying to install packages globally with pip.
8992

93+
94+
*******************************
9095
Caching packages for future use
91-
-------------------------------
96+
*******************************
9297

9398
Every developer has preferred libraries and when you are working on a lot of
9499
different projects, you are bound to have some overlap between the libraries

docs/dev/virtualenvs.rst

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.. _virtualenvironments-ref:
22

3+
4+
#############################
35
Pipenv & Virtual Environments
4-
=============================
6+
#############################
57

68
.. image:: /_static/photos/35294660055_42c02b2316_k_d.jpg
79

@@ -18,9 +20,9 @@ managing development and testing environments for any kind of project.
1820
.. Note:: This guide is written for Python 3, however, these instructions
1921
should work fine on Python 2.7—if you are still using it, for some reason.
2022

21-
23+
*********************************
2224
Make sure you've got Python & pip
23-
---------------------------------
25+
*********************************
2426

2527
Before you go any further, make sure you have Python and that it's available
2628
from your command line. You can check this by simply running:
@@ -64,9 +66,9 @@ using your OS package manager, you may have to `install pip <https://pip.pypa.io
6466
.. _Homebrew: https://brew.sh
6567
.. _Installing Python: https://docs.python-guide.org/starting/installation/
6668

67-
69+
*****************
6870
Installing Pipenv
69-
-----------------
71+
*****************
7072

7173
`Pipenv`_ is a dependency manager for Python projects. If you're familiar
7274
with Node.js' `npm`_ or Ruby's `bundler`_, it is similar in spirit to those
@@ -109,8 +111,10 @@ Use ``pip`` to install Pipenv:
109111
.. _modifying ~/.profile: https://stackoverflow.com/a/14638025
110112
.. _Control Panel: https://msdn.microsoft.com/en-us/library/windows/desktop/bb776899(v=vs.85).aspx
111113

114+
115+
************************************
112116
Installing packages for your project
113-
------------------------------------
117+
************************************
114118

115119
Pipenv manages dependencies on a per-project basis. To install packages,
116120
change into your project's directory (or just an empty directory for this
@@ -159,8 +163,9 @@ when you share your project with others. You should get output similar to this
159163
.. _Requests: https://python-requests.org
160164

161165

166+
************************
162167
Using installed packages
163-
------------------------
168+
************************
164169

165170
Now that Requests is installed you can create a simple ``main.py`` file to
166171
use it:
@@ -190,8 +195,9 @@ your script. It's also possible to spawn a new shell that ensures all commands
190195
have access to your installed packages with ``$ pipenv shell``.
191196

192197

198+
**********
193199
Next steps
194-
----------
200+
**********
195201

196202
Congratulations, you now know how to install and use Python packages! ✨ 🍰 ✨
197203

@@ -219,7 +225,7 @@ Test your installation
219225
$ virtualenv --version
220226
221227
Basic Usage
222-
~~~~~~~~~~~
228+
-----------
223229

224230
1. Create a virtual environment for a project:
225231

@@ -285,7 +291,7 @@ littered across your system, and its possible you'll forget their names or
285291
where they were placed.
286292

287293
Other Notes
288-
~~~~~~~~~~~
294+
-----------
289295

290296
Running ``virtualenv`` with the option ``--no-site-packages`` will not
291297
include the packages that are installed globally. This can be useful
@@ -318,8 +324,10 @@ control by adding it to the ignore list (see :ref:`Version Control Ignores<versi
318324

319325
.. _virtualenvwrapper-ref:
320326

327+
328+
*****************
321329
virtualenvwrapper
322-
-----------------
330+
*****************
323331

324332
`virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/index.html>`_
325333
provides a set of commands which makes working with virtual environments much
@@ -346,7 +354,7 @@ To install (make sure **virtualenv** is already installed):
346354
In Windows, the default path for WORKON_HOME is %USERPROFILE%\Envs
347355

348356
Basic Usage
349-
~~~~~~~~~~~
357+
===========
350358

351359
1. Create a virtual environment:
352360

@@ -390,7 +398,7 @@ can quickly switch between environments.
390398
$ rmvirtualenv venv
391399
392400
Other useful commands
393-
~~~~~~~~~~~~~~~~~~~~~
401+
=====================
394402

395403
``lsvirtualenv``
396404
List all of the environments.
@@ -407,14 +415,17 @@ Other useful commands
407415

408416
`Full list of virtualenvwrapper commands <https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html>`_.
409417

418+
419+
******************
410420
virtualenv-burrito
411-
------------------
421+
******************
412422

413423
With `virtualenv-burrito <https://github.com/brainsik/virtualenv-burrito>`_, you
414424
can have a working virtualenv + virtualenvwrapper environment in a single command.
415425

426+
*******
416427
autoenv
417-
-------
428+
*******
418429
When you ``cd`` into a directory containing a :file:`.env`, `autoenv <https://github.com/kennethreitz/autoenv>`_
419430
automagically activates the environment.
420431

0 commit comments

Comments
 (0)