update manual

Signed-off-by: Frost Ming <mianghong@gmail.com>
This commit is contained in:
Frost Ming
2018-11-18 00:06:03 +08:00
committed by frostming
parent 0798091d15
commit fa648ff4a4
5 changed files with 2728 additions and 181 deletions
+4 -3
View File
@@ -353,12 +353,12 @@ To prevent pipenv from loading the ``.env`` file, set the ``PIPENV_DONT_LOAD_ENV
☤ Custom Script Shortcuts
-------------------------
Pipenv supports creating custom shortcuts in the (optional) ``[scripts]`` section of your Pipfile.
Pipenv supports creating custom shortcuts in the (optional) ``[scripts]`` section of your Pipfile.
You can then run ``pipenv run <shortcut name>`` in your terminal to run the command in the
context of your pipenv virtual environment even if you have not activated the pipenv shell first.
context of your pipenv virtual environment even if you have not activated the pipenv shell first.
For example, in your Pipfile::
For example, in your Pipfile::
[scripts]
printspam = "python -c \"print('I am a silly example, no one would need to do this')\""
@@ -397,6 +397,7 @@ Pipenv supports the usage of environment variables in values. For example::
Environment variables may be specified as ``${MY_ENVAR}`` or ``$MY_ENVAR``.
On Windows, ``%MY_ENVAR%`` is supported in addition to ``${MY_ENVAR}`` or ``$MY_ENVAR``.
.. _configuration-with-environment-variables:
☤ Configuration With Environment Variables
------------------------------------------
+7 -9
View File
@@ -182,12 +182,12 @@ in your ``Pipfile.lock`` for now, run ``pipenv lock --keep-outdated``. Make sur
☤ Specifying Versions of a Package
----------------------------------
You can specify versions of a package using the `Semantic Versioning scheme <https://semver.org/>`_
(i.e. ``major.minor.micro``).
You can specify versions of a package using the `Semantic Versioning scheme <https://semver.org/>`_
(i.e. ``major.minor.micro``).
For example, to install requests you can use: ::
$ pipenv install requests~=1.2 # equivalent to requests~=1.2.0
$ pipenv install requests~=1.2 # equivalent to requests~=1.2.0
Pipenv will install version ``1.2`` and any minor update, but not ``2.0``.
@@ -201,11 +201,11 @@ To make inclusive or exclusive version comparisons you can use: ::
$ pipenv install "requests>=1.4" # will install a version equal or larger than 1.4.0
$ pipenv install "requests<=2.13" # will install a version equal or lower than 2.13.0
$ pipenv install "requests>2.19" # will install 2.19.1 but not 2.19.0
$ pipenv install "requests>2.19" # will install 2.19.1 but not 2.19.0
.. note:: The use of ``" "`` around the package and version specification is highly recommended
.. note:: The use of ``" "`` around the package and version specification is highly recommended
to avoid issues with `Input and output redirection <https://robots.thoughtbot.com/input-output-redirection-in-the-shell>`_
in Unix-based operating systems.
in Unix-based operating systems.
The use of ``~=`` is preferred over the ``==`` identifier as the former prevents pipenv from updating the packages: ::
@@ -398,10 +398,8 @@ environment into production. You can use ``pipenv lock`` to compile your depende
your development environment and deploy the compiled ``Pipfile.lock`` to all of your
production environments for reproducible builds.
.. note:
.. note::
If you'd like a ``requirements.txt`` output of the lockfile, run ``$ pipenv lock -r``.
This will include all hashes, however (which is great!). To get a ``requirements.txt``
without hashes, use ``$ pipenv run pip freeze``.
.. _configuration-with-environment-variables:https://docs.pipenv.org/advanced/#configuration-with-environment-variables
+1 -1
View File
@@ -106,7 +106,7 @@ def cli(
if man:
if system_which("man"):
path = os.sep.join([os.path.dirname(__file__), "pipenv.1"])
path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "pipenv.1")
os.execle(system_which("man"), "man", path, os.environ)
return 0
else:
+2705 -168
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -62,6 +62,17 @@ def generate_markdown(ctx):
ctx.run('pandoc CHANGELOG.rst -f rst -t markdown -o CHANGELOG.md')
@invoke.task
def generate_manual(ctx, commit=False):
log('Generating manual from reStructured source...')
ctx.run('make man -C docs')
ctx.run('cp docs/_build/man/pipenv.1 pipenv/')
if commit:
log('Commiting...')
ctx.run('git add pipenv/pipenv.1')
ctx.run('git commit -m "Update manual page."')
@invoke.task
def generate_changelog(ctx, commit=False, draft=False):
log('Generating changelog...')