mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Reformat codes
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
# Copied from pip's vendoring process
|
||||
# see https://github.com/pypa/pip/blob/95bcf8c5f6394298035a7332c441868f3b0169f4/tasks/__init__.py
|
||||
import re
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import invoke
|
||||
|
||||
@@ -3,7 +3,6 @@ import datetime
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
import invoke
|
||||
|
||||
@@ -240,8 +239,6 @@ def bump_version(ctx, dry_run=False, dev=False, pre=False, tag=None, commit=Fals
|
||||
current_version = Version.parse(__version__)
|
||||
today = datetime.date.today()
|
||||
tomorrow = today + datetime.timedelta(days=1)
|
||||
next_month = datetime.date.today().replace(month=today.month + 1, day=1)
|
||||
next_year = datetime.date.today().replace(year=today.year + 1, month=1, day=1)
|
||||
if pre and not tag:
|
||||
print('Using "pre" requires a corresponding tag.')
|
||||
return
|
||||
|
||||
@@ -41,7 +41,7 @@ LIBRARY_DIRNAMES = {
|
||||
'enum': 'backports/enum'
|
||||
}
|
||||
|
||||
PY2_DOWNLOAD = ['enum34',]
|
||||
PY2_DOWNLOAD = ['enum34']
|
||||
|
||||
# from time to time, remove the no longer needed ones
|
||||
HARDCODED_LICENSE_URLS = {
|
||||
@@ -93,7 +93,6 @@ LICENSE_RENAMES = {
|
||||
}
|
||||
|
||||
|
||||
|
||||
def drop_dir(path):
|
||||
if path.exists() and path.is_dir():
|
||||
shutil.rmtree(str(path), ignore_errors=True)
|
||||
@@ -379,7 +378,6 @@ def vendor(ctx, vendor_dir, package=None, rewrite=True):
|
||||
post_install_cleanup(ctx, vendor_dir)
|
||||
# Detect the vendored packages/modules
|
||||
vendored_libs = detect_vendored_libs(_get_vendor_dir(ctx))
|
||||
patched_libs = detect_vendored_libs(_get_patched_dir(ctx))
|
||||
log("Detected vendored libraries: %s" % ", ".join(vendored_libs))
|
||||
|
||||
# Apply pre-patches
|
||||
@@ -509,14 +507,6 @@ def download_licenses(
|
||||
new_requirements_file = fh.name
|
||||
new_requirements_file = Path(new_requirements_file)
|
||||
log(requirements)
|
||||
requirement = "-r {0}".format(new_requirements_file.as_posix())
|
||||
if 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)
|
||||
cmd = "pip download --no-binary :all: --only-binary requests_download --no-deps"
|
||||
|
||||
@@ -2,7 +2,7 @@ import invoke
|
||||
|
||||
from pipenv._compat import TemporaryDirectory
|
||||
|
||||
from . import _get_git_root, _get_vendor_dir, log
|
||||
from . import _get_vendor_dir, log
|
||||
|
||||
|
||||
@invoke.task
|
||||
|
||||
Reference in New Issue
Block a user