Skip to content

Commit 0094f9e

Browse files
committed
Simplify
1 parent 6d3e2c6 commit 0094f9e

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎setup.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,8 @@ def default_hook(config):
568568
os.path.isdir(PY2K_DIR) != IS_PY2K and os.path.isdir(LIB_DIR)):
569569
shutil.rmtree(LIB_DIR)
570570

571-
if IS_PY2K and any(arg.startswith('install') or
572-
arg.startswith('build') or
573-
arg.startswith('bdist') for arg in sys.argv):
571+
if IS_PY2K and any(arg.startswith(('install', 'build', 'bdist'))
572+
for arg in sys.argv):
574573
generate_py2k(config)
575574
packages_root = get_cfg_value(config, 'files', 'packages_root')
576575
packages_root = os.path.join(PY2K_DIR, packages_root)
@@ -580,9 +579,8 @@ def default_hook(config):
580579
def language_tool_hook(config):
581580
if 'sdist' in sys.argv:
582581
del config['files']['package_data']
583-
elif any(arg.startswith('install') or
584-
arg.startswith('build') or
585-
arg.startswith('bdist') for arg in sys.argv):
582+
elif any(arg.startswith(('install', 'build', 'bdist'))
583+
for arg in sys.argv):
586584
download_lt()
587585

588586

0 commit comments

Comments
 (0)