mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge branch 'master' into docs/deployment-guide
This commit is contained in:
+19
-5
@@ -349,15 +349,29 @@ To prevent pipenv from loading the ``.env`` file, set the ``PIPENV_DONT_LOAD_ENV
|
||||
☤ Custom Script Shortcuts
|
||||
-------------------------
|
||||
|
||||
Pipenv supports to customize shortcuts in the ``scripts`` section. ``pipenv run`` will automatically load it and find the correct command to replace with. Given the ``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.
|
||||
|
||||
For example, in your Pipfile::
|
||||
|
||||
[scripts]
|
||||
printfoo = "python -c \"print('foo')\""
|
||||
printspam = "python -c \"print('I am a silly example, no one would need to do this')\""
|
||||
|
||||
You can type in your terminal to run::
|
||||
And then in your terminal::
|
||||
|
||||
$ pipenv run printfoo
|
||||
foo
|
||||
$ pipenv run printspam
|
||||
I am a silly example, no one would need to do this
|
||||
|
||||
Commands that expect arguments will also work.
|
||||
For example::
|
||||
|
||||
[scripts]
|
||||
echospam = "echo I am really a very silly example"
|
||||
|
||||
$ pipenv run echospam "indeed"
|
||||
I am really a very silly example indeed
|
||||
|
||||
☤ Support for Environment Variables
|
||||
-----------------------------------
|
||||
|
||||
+2
-2
@@ -247,7 +247,7 @@ the current working directory when working on packages::
|
||||
"e1839a8" = {path = ".", editable = true}
|
||||
...
|
||||
|
||||
.. note:: All sub-dependencies will get added to the ``Pipfile.lock`` as well. Sub-dependencies are **not** added to the
|
||||
.. note:: All sub-dependencies will get added to the ``Pipfile.lock`` as well. Sub-dependencies are **not** added to the
|
||||
``Pipfile.lock`` if you leave the ``-e`` option out.
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ If you experience issues with ``$ pipenv shell``, just check the ``PIPENV_SHELL`
|
||||
|
||||
You can install packages with pipenv from git and other version control systems using URLs formatted according to the following rule::
|
||||
|
||||
<vcs_type>+<scheme>://<location>/<user_or_organizatoin>/<repository>@<branch_or_tag>#<package_name>
|
||||
<vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag>#egg=<package_name>
|
||||
|
||||
The only optional section is the ``@<branch_or_tag>`` section. When using git over SSH, you may use the shorthand vcs and scheme alias ``git+git@<location>:<user_or_organization>/<repository>@<branch_or_tag>#<package_name>``. Note that this is translated to ``git+ssh://git@<location>`` when parsed.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ including reporting bugs or requesting features. This golden rule is
|
||||
**All contributions are welcome**, as long as
|
||||
everyone involved is treated with respect.
|
||||
|
||||
.. _be cordial or be on your way: http://kennethreitz.org/be-cordial-or-be-on-your-way/
|
||||
.. _be cordial or be on your way: https://www.kennethreitz.org/essays/be-cordial-or-be-on-your-way
|
||||
|
||||
.. _early-feedback:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user