mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 04:34:37 +03:00
@@ -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())
|
||||
|
||||
@@ -94,4 +94,3 @@ class QtArchives:
|
||||
|
||||
def get_archives(self):
|
||||
return self.archives
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
18
setup.py
18
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"]
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user