mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 04:34:37 +03:00
Add MANIFEST.in for distributing logging.yml
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,4 +8,5 @@ __pycache__
|
||||
.tox
|
||||
.venv
|
||||
_build
|
||||
ci/*.matrix.gen.yml
|
||||
ci/*.matrix.gen.yml
|
||||
docs/_build
|
||||
25
MANIFEST.in
Normal file
25
MANIFEST.in
Normal file
@@ -0,0 +1,25 @@
|
||||
include *.rst
|
||||
include *.txt
|
||||
include *.cfg
|
||||
include *.yml
|
||||
include AUTHORS
|
||||
include LICENSE
|
||||
include tox.ini
|
||||
recursive-include aqt *.yml
|
||||
recursive-include ci *.py
|
||||
recursive-include ci *.yml
|
||||
recursive-include docs *.bat
|
||||
recursive-include docs *.dia
|
||||
recursive-include docs *.py
|
||||
recursive-include docs *.rst
|
||||
recursive-include docs *.yml
|
||||
recursive-include docs *.svg
|
||||
recursive-include docs *.html
|
||||
recursive-include docs *.txt
|
||||
recursive-include docs Makefile
|
||||
recursive-include tests *.conf
|
||||
recursive-include tests *.cpp
|
||||
recursive-include tests *.pro
|
||||
recursive-include tests *.qml
|
||||
recursive-include tests *.qrc
|
||||
recursive-include tests *.svg
|
||||
@@ -20,11 +20,10 @@
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
import requests
|
||||
import traceback
|
||||
import xml.etree.ElementTree as ElementTree
|
||||
from logging import getLogger
|
||||
from six import StringIO
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
class QtPackage:
|
||||
|
||||
46
aqt/cli.py
46
aqt/cli.py
@@ -26,8 +26,8 @@ import logging.config
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
import yaml
|
||||
from aqt.archives import QtArchives
|
||||
from aqt.installer import QtInstaller
|
||||
|
||||
@@ -37,24 +37,24 @@ class Cli():
|
||||
__slot__ = ['parser']
|
||||
|
||||
COMBINATION = [
|
||||
{'os_name': 'linux', 'target': 'desktop', 'arch': 'gcc_64'},
|
||||
{'os_name': 'linux', 'target': 'android', 'arch': 'android_x86'},
|
||||
{'os_name': 'linux', 'target': 'android', 'arch': 'android_armv7'},
|
||||
{'os_name': 'mac', 'target': 'desktop', 'arch': 'clang_64'},
|
||||
{'os_name': 'mac', 'target': 'ios', 'arch': 'ios'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_msvc2017_64'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_msvc2017'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_msvc2015_64'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_msvc2015'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_mingw73'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_mingw73'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_mingw53'},
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_mingw53'},
|
||||
{'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_x64'},
|
||||
{'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_x86'},
|
||||
{'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_armv7'},
|
||||
{'os_name': 'windows', 'target': 'android', 'arch': 'android_x86'},
|
||||
{'os_name': 'windows', 'target': 'android', 'arch': 'android_armv7'},
|
||||
{'os_name': 'linux', 'target': 'desktop', 'arch': 'gcc_64'}, # noqa:E241
|
||||
{'os_name': 'linux', 'target': 'android', 'arch': 'android_x86'}, # noqa:E241
|
||||
{'os_name': 'linux', 'target': 'android', 'arch': 'android_armv7'}, # noqa:E241
|
||||
{'os_name': 'mac', 'target': 'desktop', 'arch': 'clang_64'}, # noqa:E241
|
||||
{'os_name': 'mac', 'target': 'ios', 'arch': 'ios'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_msvc2017_64'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_msvc2017'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_msvc2015_64'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_msvc2015'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_mingw73'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_mingw73'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win64_mingw53'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'desktop', 'arch': 'win32_mingw53'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_x64'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_x86'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'winrt', 'arch': 'win64_msvc2017_winrt_armv7'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'android', 'arch': 'android_x86'}, # noqa:E241
|
||||
{'os_name': 'windows', 'target': 'android', 'arch': 'android_armv7'}, # noqa:E241
|
||||
]
|
||||
|
||||
def check_arg_combination(self, qt_version, os_name, target, arch):
|
||||
@@ -103,11 +103,11 @@ class Cli():
|
||||
args.print_help()
|
||||
exit(1)
|
||||
if output_dir is not None:
|
||||
QtInstaller(QtArchives(os_name, qt_version, target, arch, mirror=mirror, logging=self.logger),
|
||||
QtInstaller(QtArchives(os_name, qt_version, target, arch, mirror=mirror, logging=self.logger),
|
||||
logging=self.logger).install(command=sevenzip, target_dir=output_dir)
|
||||
else:
|
||||
QtInstaller(QtArchives(os_name, qt_version, target, arch, mirror=mirror, logging=self.logger),
|
||||
logging = self.logger).install(command=sevenzip)
|
||||
logging=self.logger).install(command=sevenzip)
|
||||
|
||||
sys.stdout.write("\033[K")
|
||||
print("Finished installation")
|
||||
@@ -159,11 +159,11 @@ class Cli():
|
||||
envconf = os.getenv(env_key, None)
|
||||
conf = None
|
||||
if args.logging_conf:
|
||||
conf=args.logging_conf
|
||||
conf = args.logging_conf
|
||||
elif envconf is not None:
|
||||
conf = envconf
|
||||
if conf is None or not os.path.exists(conf):
|
||||
conf=os.path.join(os.path.dirname(__file__), 'logging.yml')
|
||||
conf = os.path.join(os.path.dirname(__file__), 'logging.yml')
|
||||
with open(conf, 'r') as f:
|
||||
log_config = yaml.safe_load(f.read())
|
||||
logging.config.dictConfig(log_config)
|
||||
|
||||
@@ -22,16 +22,18 @@
|
||||
|
||||
import functools
|
||||
import os
|
||||
import py7zr
|
||||
import requests
|
||||
import traceback
|
||||
import xml.etree.ElementTree as ElementTree
|
||||
from logging import getLogger
|
||||
from six import StringIO
|
||||
from multiprocessing.dummy import Pool
|
||||
from operator import and_
|
||||
from subprocess import run
|
||||
|
||||
from six import StringIO
|
||||
|
||||
import py7zr
|
||||
import requests
|
||||
|
||||
NUM_PROCESS = 3
|
||||
blacklist = ['http://mirrors.ustc.edu.cn',
|
||||
'http://mirrors.tuna.tsinghua.edu.cn',
|
||||
@@ -54,7 +56,6 @@ class QtInstaller:
|
||||
else:
|
||||
self.logger = getLogger('aqt')
|
||||
|
||||
|
||||
@staticmethod
|
||||
def retrieve_archive(package, path=None, command=None):
|
||||
archive = package.archive
|
||||
|
||||
2
docs/requirements.txt
Normal file
2
docs/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
sphinx>=1.8
|
||||
sphinx_rtd_theme
|
||||
11
setup.py
11
setup.py
@@ -21,14 +21,7 @@ setup(name='aqtinstall',
|
||||
author_email='miurahr@linux.com',
|
||||
packages=["aqt"],
|
||||
install_requires=['requests', 'six', 'py7zr'],
|
||||
extras_require={
|
||||
'dev': [
|
||||
'pytest',
|
||||
'pytest-pep8',
|
||||
'pytest-cov',
|
||||
'flake8'
|
||||
]
|
||||
},
|
||||
extras_require={'dev': ['pytest', 'pytest-pep8', 'pytest-cov', 'flake8']},
|
||||
scripts=["bin/aqt"],
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
@@ -43,5 +36,5 @@ setup(name='aqtinstall',
|
||||
'Programming Language :: C++',
|
||||
'Topic :: Software Development',
|
||||
'Topic :: Software Development :: Libraries',
|
||||
],
|
||||
],
|
||||
)
|
||||
|
||||
29
tox.ini
Normal file
29
tox.ini
Normal file
@@ -0,0 +1,29 @@
|
||||
[tox]
|
||||
envlist = check, docs
|
||||
|
||||
[testenv]
|
||||
|
||||
[flake8]
|
||||
ignore =
|
||||
|
||||
[testenv:check]
|
||||
deps =
|
||||
docutils
|
||||
check-manifest
|
||||
flake8
|
||||
readme-renderer
|
||||
pygments
|
||||
isort
|
||||
skip_install = true
|
||||
commands =
|
||||
check-manifest {toxinidir}
|
||||
flake8 aqt tests setup.py
|
||||
isort --verbose --check-only --diff --recursive aqt tests setup.py
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
-r{toxinidir}/docs/requirements.txt
|
||||
commands =
|
||||
sphinx-build {posargs:-E} -b html docs dist/docs
|
||||
sphinx-build -b linkcheck docs dist/docs
|
||||
|
||||
Reference in New Issue
Block a user