Merge branch 'master' into patch-pep423

This commit is contained in:
Dan Ryan
2018-04-10 21:16:14 -04:00
committed by GitHub
5 changed files with 19 additions and 6 deletions
+1
View File
@@ -6,6 +6,7 @@
- Fix bug resolving & locking markers correctly.
- Fix locking failure for packages not available on the default PyPI.
- Upgrade python-dotenv to support "export" syntax.
- Bugfix for allow_global with new resolver fixes.
11.9.0:
- Vastly improve markers capabilities.
- Support for environment variables in Pipfiles.
+9 -3
View File
@@ -126,6 +126,7 @@ Example Pipfile.lock
- Generally, keep both ``Pipfile`` and ``Pipfile.lock`` in version control.
- Do not keep ``Pipfile.lock`` in version control if multiple versions of Python are being targeted.
- Specify your target Python version in your `Pipfile`'s ``[requires]`` section. Ideally, you should only have one target Python version, as this is a deployment tool.
- ``pipenv install`` is fully compatible with ``pip install`` syntax, for which the full documentation can be found `here <https://pip.pypa.io/en/stable/user_guide/#installing-packages>`_.
@@ -234,11 +235,13 @@ automatically, falling back to whatever your system's default ``python`` install
You can tell Pipenv to install a path as editable — often this is useful for
the current working directory when working on packages::
$ pipenv install '-e .' --dev
$ pipenv install --dev -e .
$ cat Pipfile
...
[dev-packages]
"e1839a8" = {path = ".", editable = true}
...
Note that all sub-dependencies will get added to the ``Pipfile.lock`` as well.
@@ -325,12 +328,15 @@ You should do this for your shell too, in your ``~/.profile`` or ``~/.bashrc`` o
☤ A Note about VCS Dependencies
-------------------------------
Pipenv will resolve the subdependencies of VCS dependencies, but only if they are editable, like so::
Pipenv will resolve the subdependencies of VCS dependencies, but only if they are installed in editable mode::
$ pipenv install -e git+https://github.com/requests/requests.git#egg=requests
$ cat Pipfile
[packages]
requests = {git = "https://github.com/requests/requests.git", editable=true}
If editable is not true, subdependencies will not get resolved.
If editable is not true, subdependencies will not be resolved.
For more information about other options available when specifying VCS dependencies, please check the `Pipfile spec <https://github.com/pypa/pipfile>`__.
+2
View File
@@ -1028,6 +1028,7 @@ def do_lock(
project=project,
clear=clear,
pre=pre,
allow_global=system,
)
# Add develop dependencies to lockfile.
for dep in results:
@@ -1087,6 +1088,7 @@ def do_lock(
project=project,
clear=False,
pre=pre,
allow_global=system,
)
# Add default dependencies to lockfile.
for dep in results:
+4 -1
View File
@@ -24,6 +24,7 @@ def main():
do_pre = '--pre' in ' '.join(sys.argv)
do_clear = '--clear' in ' '.join(sys.argv)
is_debug = '--debug' in ' '.join(sys.argv)
system = '--system' in ' '.join(sys.argv)
new_sys_argv = []
for v in sys.argv:
if v.startswith('--'):
@@ -51,7 +52,7 @@ def main():
del packages[i]
project = pipenv.core.project
def resolve(packages, pre, sources, verbose, clear):
def resolve(packages, pre, sources, verbose, clear, system):
import pipenv.utils
return pipenv.utils.resolve_deps(
packages,
@@ -61,6 +62,7 @@ def main():
sources=sources,
clear=clear,
verbose=verbose,
allow_global=system,
)
results = resolve(
@@ -69,6 +71,7 @@ def main():
sources=project.sources,
verbose=is_verbose,
clear=do_clear,
system=system,
)
print('RESULTS:')
if results:
+3 -2
View File
@@ -372,18 +372,19 @@ def actually_resolve_reps(
def venv_resolve_deps(
deps, which, project, pre=False, verbose=False, clear=False
deps, which, project, pre=False, verbose=False, clear=False, allow_global=False
):
from . import resolver
import json
resolver = escape_grouped_arguments(resolver.__file__.rstrip('co'))
cmd = '{0} {1} {2} {3} {4}'.format(
cmd = '{0} {1} {2} {3} {4} {5}'.format(
escape_grouped_arguments(which('python')),
resolver,
'--pre' if pre else '',
'--verbose' if verbose else '',
'--clear' if clear else '',
'--system' if allow_global else '',
)
os.environ['PIPENV_PACKAGES'] = '\n'.join(deps)
c = delegator.run(cmd, block=True)