Update news and vendoring scripts

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-08-25 13:27:49 -04:00
parent 124a463d96
commit cec086ee92
3 changed files with 25 additions and 5 deletions
+14 -1
View File
@@ -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``
+1 -1
View File
@@ -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():
+10 -3
View File
@@ -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,
)