summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-03-24 11:45:08 +0000
committerGitHub <noreply@github.com>2020-03-24 13:45:08 +0200
commitb74eeb72ea09f70076ba72779a7a331f8e009708 (patch)
tree59aa449e74faf5bec645d4f214fa61363a53b942 /src
parente5d869715e17bc7c5426c52904027602067e0fb7 (diff)
downloadwheel-git-b74eeb72ea09f70076ba72779a7a331f8e009708.tar.gz
Ignore files terminating in ~. (#347)
This is Unix's most common pattern for backup files. They are often present, but I can't think of a good reason for them to be distributed.
Diffstat (limited to 'src')
-rw-r--r--src/wheel/bdist_wheel.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wheel/bdist_wheel.py b/src/wheel/bdist_wheel.py
index 5cece1f..5bc9265 100644
--- a/src/wheel/bdist_wheel.py
+++ b/src/wheel/bdist_wheel.py
@@ -339,6 +339,10 @@ class bdist_wheel(Command):
for pattern in patterns:
for path in iglob(pattern):
+ if path.endswith('~'):
+ logger.debug('ignoring license file "%s" as it looks like a backup', path)
+ continue
+
if path not in files and os.path.isfile(path):
logger.info('adding license file "%s" (matched pattern "%s")', path, pattern)
files.add(path)