Update vendor packages

This commit is contained in:
frostming
2019-07-17 12:21:11 +08:00
parent 4f9a3a36ad
commit 089bb57d7e
4 changed files with 14 additions and 5 deletions
+4 -1
View File
@@ -58,7 +58,10 @@ PYTHON_IMPLEMENTATIONS = (
"pyston",
"micropython",
)
KNOWN_EXTS = {"exe", "py", "fish", "sh", ""}
if os.name == "nt":
KNOWN_EXTS = {"exe", "py", "bat", ""}
else:
KNOWN_EXTS = {"sh", "bash", "csh", "zsh", "fish", "py", ""}
KNOWN_EXTS = KNOWN_EXTS | set(
filter(None, os.environ.get("PATHEXT", "").split(os.pathsep))
)
+5 -3
View File
@@ -28,6 +28,8 @@ from vistir.contextmanagers import cd, temp_path
from vistir.misc import run
from vistir.path import create_tracked_tempdir, ensure_mkdir_p, mkdir_p, rmtree
from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
from .utils import (
get_default_pyproject_backend,
get_name_variants,
@@ -37,8 +39,6 @@ from .utils import (
split_vcs_method_from_uri,
strip_extras_markers_from_requirement,
)
from ..environment import MYPY_RUNNING
from ..exceptions import RequirementError
try:
from setuptools.dist import distutils, Distribution
@@ -712,11 +712,13 @@ def ast_unparse(item, initial_mapping=False, analyzer=None, recurse=True): # no
item.right = right_item
unparsed = item
else:
unparsed = right_item + left_item
unparsed = left_item + right_item
else:
unparsed = item
elif isinstance(item.op, ast.Sub):
unparsed = unparse(item.left) - unparse(item.right)
else:
unparsed = item
elif isinstance(item, ast.Name):
if not initial_mapping:
unparsed = item.id
+3 -1
View File
@@ -505,7 +505,9 @@ def split_markers_from_line(line):
# type: (AnyStr) -> Tuple[AnyStr, Optional[AnyStr]]
"""Split markers from a dependency"""
quote_chars = ["'", '"']
line_quote = next(iter(quote for quote in quote_chars if line.startswith(quote)), None)
line_quote = next(
iter(quote for quote in quote_chars if line.startswith(quote)), None
)
if line_quote and line.endswith(line_quote):
line = line.strip(line_quote)
if not any(line.startswith(uri_prefix) for uri_prefix in SCHEME_LIST):
+2
View File
@@ -82,6 +82,7 @@ def release(ctx, dry_run=False):
ctx.run("towncrier --draft > CHANGELOG.draft.rst")
log("would remove: news/*")
log("would remove: CHANGELOG.draft.rst")
log("would update: pipenv/pipenv.1")
log(f'Would commit with message: "Release v{version}"')
else:
ctx.run("towncrier")
@@ -90,6 +91,7 @@ def release(ctx, dry_run=False):
)
ctx.run("git rm CHANGELOG.draft.rst")
generate_manual(ctx)
ctx.run("git add pipenv/pipenv.1")
ctx.run(f'git commit -m "Release v{version}"')
tag_content = tag_content.replace('"', '\\"')