Improve examples and add example subsection titles
@@ -64,6 +64,9 @@ Launch an interpreter with ``requests``, ``flask`` and ``psutil`` in the environ
$ pex requests flask 'psutil>2,<3'
+Save Dependencies From Pip
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
Or instead freeze your current virtualenv via requirements.txt and execute it anywhere:
.. code-block:: bash
@@ -72,6 +75,9 @@ Or instead freeze your current virtualenv via requirements.txt and execute it an
$ deactivate
$ ./my_virtualenv.pex
+Ephemeral Environments
+~~~~~~~~~~~~~~~~~~~~~~
+
Run webserver.py in an environment containing ``flask`` as a quick way to experiment:
.. code-block:: bash
@@ -84,20 +90,32 @@ Launch Sphinx in an ephemeral pex environment using the Sphinx entry point ``sph
$ pex sphinx -e sphinx:main -- --help
-Build a standalone pex binary into ``pex.pex`` using the ``pex`` console_scripts entry point:
+Using Entry Points
+~~~~~~~~~~~~~~~~~~
+
+Projects specifying a ``console_scripts`` entry point in their configuration
+can build standalone executables for those entry points.
+
+To build a standalone ``pex-tools-executable.pex`` binary that runs the
+``pex-tools`` console script found in all pex version ``2.1.35`` and newer distributions:
.. code-block:: bash
- $ pex pex -c pex -o pex.pex
+ $ pex "pex>=2.1.35" --console-script pex-tools --output-file pex-tools-executable.pex
+
+Specifying A Specific Interpreter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can also build pex files that use a specific interpreter type:
.. code-block:: bash
- $ pex pex -c pex --python=pypy -o pypy-pex.pex
+ $ pex "pex>=2.1.35" -c pex-tools --python=pypy -o pex-tools-pypy-executable.pex
Most pex options compose well with one another, so the above commands can be
-mixed and matched. For a full list of options, just type ``pex --help``.
+mixed and matched, and equivalent short options are available.
+
+For a full list of options, just type ``pex --help``.
Integrating pex into your workflow
