diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-03-21 05:55:44 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-03-21 05:55:44 -0400 |
commit | cfbefe5715e31db3c8cac70f7a1cd1c16fd4b5a7 (patch) | |
tree | 1551248b2a29b34b26388ea68fe994854f3e84e2 /setuptools/command/egg_info.py | |
parent | 7843688bc33dd4e13e10130bc49da4c290fe7d7f (diff) | |
parent | 060445bfb557a1d0f6b726716dafa6bacaa44c34 (diff) | |
download | external_python_setuptools-cfbefe5715e31db3c8cac70f7a1cd1c16fd4b5a7.tar.gz external_python_setuptools-cfbefe5715e31db3c8cac70f7a1cd1c16fd4b5a7.tar.bz2 external_python_setuptools-cfbefe5715e31db3c8cac70f7a1cd1c16fd4b5a7.zip |
Merge branch 'master' into jorikdima-master
Diffstat (limited to 'setuptools/command/egg_info.py')
-rw-r--r-- | setuptools/command/egg_info.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index d9fe3da3..7fa89541 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -33,6 +33,7 @@ from setuptools.glob import glob from setuptools.extern import packaging from setuptools import SetuptoolsDeprecationWarning + def translate_pattern(glob): """ Translate a file path glob like '*.txt' in to a regular expression. @@ -113,7 +114,7 @@ def translate_pattern(glob): pat += sep pat += r'\Z' - return re.compile(pat, flags=re.MULTILINE|re.DOTALL) + return re.compile(pat, flags=re.MULTILINE | re.DOTALL) class InfoCommon: @@ -266,7 +267,7 @@ class egg_info(InfoCommon, Command): to the file. """ log.info("writing %s to %s", what, filename) - if six.PY3: + if not six.PY2: data = data.encode("utf-8") if not self.dry_run: f = open(filename, 'wb') @@ -568,6 +569,7 @@ class manifest_maker(sdist): def add_defaults(self): sdist.add_defaults(self) + self.check_license() self.filelist.append(self.template) self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) @@ -636,7 +638,9 @@ def warn_depends_obsolete(cmd, basename, filename): def _write_requirements(stream, reqs): lines = yield_lines(reqs or ()) - append_cr = lambda line: line + '\n' + + def append_cr(line): + return line + '\n' lines = map(append_cr, lines) stream.writelines(lines) @@ -702,7 +706,8 @@ def get_pkg_info_revision(): Get a -r### off of PKG-INFO Version in case this is an sdist of a subversion revision. """ - warnings.warn("get_pkg_info_revision is deprecated.", EggInfoDeprecationWarning) + warnings.warn( + "get_pkg_info_revision is deprecated.", EggInfoDeprecationWarning) if os.path.exists('PKG-INFO'): with io.open('PKG-INFO') as f: for line in f: @@ -713,4 +718,4 @@ def get_pkg_info_revision(): class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning): - """Class for warning about deprecations in eggInfo in setupTools. Not ignored by default, unlike DeprecationWarning.""" + """Deprecated behavior warning for EggInfo, bypassing suppression.""" |