--- a/setup.py Mon Sep 09 18:52:08 2019 +0200 +++ b/setup.py Thu Oct 03 11:12:10 2019 +0200 @@ -8,7 +8,6 @@ Module to prepare a distribution package for uploading to PyPI. """ -from __future__ import unicode_literals import os import sys @@ -57,8 +56,10 @@ filesList = [] for dirpath, _dirnames, filenames in os.walk(package): for fname in filenames: - if not fname.startswith('.') and \ - os.path.splitext(fname)[1] in extensions: + if ( + not fname.startswith('.') and + os.path.splitext(fname)[1] in extensions + ): filesList.append( os.path.relpath(os.path.join(dirpath, fname), package)) return filesList @@ -137,8 +138,7 @@ pass try: hgOut = subprocess.check_output(["hg", "identify", "-i"]) - if sys.version_info[0] == 3: - hgOut = hgOut.decode() + hgOut = hgOut.decode() except (OSError, subprocess.CalledProcessError): hgOut = "" if hgOut: @@ -148,8 +148,10 @@ f = open(fileName + ".orig", "r", encoding="utf-8") text = f.read() f.close() - text = text.replace("@@REVISION@@", hgOut)\ + text = ( + text.replace("@@REVISION@@", hgOut) .replace("@@VERSION@@", version) + ) f = open(fileName, "w") f.write(text) f.close() @@ -174,8 +176,10 @@ f = open(fileName + ".orig", "r", encoding="utf-8") text = f.read() f.close() - text = text.replace("@VERSION@", version)\ + text = ( + text.replace("@VERSION@", version) .replace("@DATE@", datetime.date.today().isoformat()) + ) f = open(fileName, "w") f.write(text) f.close() @@ -316,8 +320,8 @@ "": getPackageData( "eric6", [".png", ".svg", ".svgz", ".xpm", ".ico", ".gif", ".icns", ".txt", - ".style", ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", - ".e6h", ".api", ".bas" ".dat"] + ".tmpl", ".html", ".qch", ".css", ".qss", ".e4h", ".e6h", ".api", + ".bas" ".dat"] ) + ["i18n/eric6_de.qm", "i18n/eric6_en.qm", "i18n/eric6_es.qm", "i18n/eric6_ru.qm", ]