diff --git a/aqt/__init__.py b/aqt/__init__.py index ea2f4db..c9e659b 100644 --- a/aqt/__init__.py +++ b/aqt/__init__.py @@ -29,7 +29,8 @@ from aqt.installer import QtInstaller def main(): - parser = argparse.ArgumentParser(description='Install Qt SDK.', formatter_class=RawTextHelpFormatter, add_help=True) + parser = argparse.ArgumentParser(description='Install Qt SDK.', + formatter_class=RawTextHelpFormatter, add_help=True) parser.add_argument("qt_version", help="Qt version in the format of \"5.X.Y\"") parser.add_argument('host', choices=['linux', 'mac', 'windows'], help="host os name") parser.add_argument('target', choices=['desktop', 'android', 'ios'], help="target sdk") @@ -65,4 +66,4 @@ def main(): if __name__ == "__main__": - sys.exit(main()) + sys.exit(main()) diff --git a/aqt/archives.py b/aqt/archives.py index 29f9e8f..c860c71 100644 --- a/aqt/archives.py +++ b/aqt/archives.py @@ -94,4 +94,3 @@ class QtArchives: def get_archives(self): return self.archives - diff --git a/aqt/installer.py b/aqt/installer.py index b0d5d18..5b4595e 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -47,7 +47,7 @@ class QtInstaller: urllib.request.urlretrieve(url, archive) sys.stdout.write("\033[K") print("-Extracting {}...".format(archive)) - if platform.system() is 'Windows': + if platform.system() == 'Windows': subprocess.run([r'C:\Program Files\7-Zip\7z.exe', 'x', '-aoa', '-y', archive]) else: subprocess.run([r'7z', 'x', '-aoa', '-y', archive]) @@ -88,6 +88,5 @@ class QtInstaller: if 'QT_EDITION' in line: line = 'QT_EDITION = OpenSource' f.write(line) - except: + except IOError: pass - diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..113ca5f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 125 diff --git a/setup.py b/setup.py index f4b6001..1213345 100644 --- a/setup.py +++ b/setup.py @@ -5,18 +5,20 @@ import os from setuptools import setup + def readme(): - with io.open(os.path.join(os.path.dirname(__file__),'README.rst'), mode="r", encoding="UTF-8") as f: + with io.open(os.path.join(os.path.dirname(__file__), 'README.rst'), mode="r", encoding="UTF-8") as f: return f.read() -setup(name='aqtinstall', - version='0.2.0', - description='Another Qt installer', + +setup(name = 'aqtinstall', + version = '0.2.0', + description = 'Another Qt installer', url='http://github.com/miurahr/qli-installer', - license='MIT', + license ='MIT', long_description=readme(), - author='Hioshi Miura', - author_email='miurahr@linux.com', + author ='Hioshi Miura', + author_email ='miurahr@linux.com', packages = ["aqt"], scripts = ["aqtinst"] -) + )