From cec086ee928783c819b72ea1749b03e69777cddd Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Sat, 25 Aug 2018 13:27:49 -0400 Subject: [PATCH] Update news and vendoring scripts Signed-off-by: Dan Ryan --- news/2639.vendor | 15 ++++++++++++++- pipenv/patched/piptools/utils.py | 2 +- tasks/vendoring/__init__.py | 13 ++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/news/2639.vendor b/news/2639.vendor index 777350aa..e0d5516d 100644 --- a/news/2639.vendor +++ b/news/2639.vendor @@ -1 +1,14 @@ -Vendored new libraries ``vistir`` and ``pip-shims``. +- Vendored new libraries ``vistir`` and ``pip-shims``. + +- Update vendored libraries: + - ``scandir`` to ``1.9.0`` + - ``click-completion`` to ``0.4.1`` + - ``semver`` to ``2.8.1`` + - ``shellingham`` to ``1.2.4`` + - ``pytoml`` to ``0.1.18`` + - ``certifi`` to ``2018.8.13`` + - ``ptyprocess`` to ``0.6.0`` + - ``requirementslib`` to ``1.1.2`` + - ``pythonfinder`` to ``1.0.2`` + - ``pipdeptree`` to ``0.13.0`` + - ``python-dotenv`` to ``0.9.1`` diff --git a/pipenv/patched/piptools/utils.py b/pipenv/patched/piptools/utils.py index c77fd8ad..2f389eec 100644 --- a/pipenv/patched/piptools/utils.py +++ b/pipenv/patched/piptools/utils.py @@ -341,7 +341,7 @@ def fs_str(string): _fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding() -# Borrowed from Pew. +# Borrowed from pew to avoid importing pew which imports psutil # See https://github.com/berdario/pew/blob/master/pew/_utils.py#L82 @contextmanager def temp_environ(): diff --git a/tasks/vendoring/__init__.py b/tasks/vendoring/__init__.py index 4deb58b8..c09fae75 100644 --- a/tasks/vendoring/__init__.py +++ b/tasks/vendoring/__init__.py @@ -407,17 +407,24 @@ def rewrite_all_imports(ctx): @invoke.task -def download_licenses(ctx, vendor_dir=None, requirements_file='vendor.txt', package=None): +def download_licenses(ctx, vendor_dir=None, requirements_file='vendor.txt', package=None, only=False): log('Downloading licenses') if not vendor_dir: vendor_dir = _get_vendor_dir(ctx) requirements_file = vendor_dir / requirements_file requirement = "-r {0}".format(requirements_file.as_posix()) if package: - requirement = _ensure_package_in_requirements(ctx, requirements_file, package) + if not only: + # for packages we want to add to the requirements file + requirement = _ensure_package_in_requirements(ctx, requirements_file, package) + else: + # for packages we want to get the license for by themselves + requirement = package tmp_dir = vendor_dir / '__tmp__' + # TODO: Fix this whenever it gets sorted out (see https://github.com/pypa/pip/issues/5739) + ctx.run('pip install flit') ctx.run( - 'pip download --no-binary :all: --no-deps -d {0} {1}'.format( + 'pip download --no-binary :all: --no-build-isolation --no-deps -d {0} {1}'.format( tmp_dir.as_posix(), requirement, )