mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
+4
-3
@@ -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
@@ -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
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -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...')
|
||||
|
||||
Reference in New Issue
Block a user