Skip to content
master
Switch branches/tags
Code

Latest commit

In an earlier PR, I added calls to `disable_socket()` from
`pytest_socket` where I thought they were needed to prevent some tests
from accessing the network, in case they weren't monkeypatched properly.
Today, I discovered that `disable_socket()` disables sockets globally
for all tests, which means that the tests that use remote data cannot
run if they are executed after another test calls `disable_socket()`.

This change calls `disable_socket()` once from `conftest.py`, so that
no tests are allowed to use network data unless they are marked as ok
to use the network, with `@pytest.mark.enable_socket`. See example of
usage in `tests/test_connection.py`.

Changed return code for unexpected exceptions:

This allows us to write tests that can discover whether an unexpected
exception occurred just by checking the return code, rather than reading
stderr. This will allow us to write less friable tests that don't break
every time some insignificant output details change.

This change catches exceptions derived from Exception and
KeyboardInterrupt raised by `installer`, while run by multiple
processes, and propagates them back to earlier stack entries. This will
prevent any OSError and BrokenPipe exceptions that would otherwise be
raised when one process has an exception while the other processes are
still running.

This also handles the MemoryError exception we saw in #416, and offers
some suggestions for solving the issue.
d521314

Git stats

Files

Permalink
Failed to load latest commit information.

Another Qt installer(aqt)

  • Release: pypi
  • Documentation: docs
  • Test status: gha and Coverage: coveralls

This is a utility alternative to the official graphical Qt installer, for using in CI environment where an interactive UI is not usable, or just on command line.

It can automatically download prebuilt Qt binaries, documents and sources for target specified, when the versions are on Qt download mirror sites.

Note

Because it is an installer utility, it can download from Qt distribution site and its mirror. The site is operated by The Qt Company who may remove versions you may want to use that become end of support. Please don't blame us.

Warning

This is NOT franchised with The Qt Company and The Qt Project. Please don't ask them about aqtinstall.

License and copyright

This program is distributed under MIT license.

Qt SDK and its related files are under its licenses. When using aqtinstall, you are considered to agree upon Qt licenses. aqtinstall installs Qt SDK as of a (L)GPL Free Software.

For details see Qt licensing and Licenses used in Qt5

Requirements

  • Minimum Python version:
    3.6
  • Recommended Python version:
    3.9 (frequently tested on)
  • Dependencies:
    requests semantic_version patch py7zr texttable bs4 dataclasses
  • Operating Systems:
    Linux, macOS, MS Windows

Documentation

There is precise documentation with many examples. You are recommended to read the Getting started section.

Install

Same as usual, it can be installed with pip:

pip install -U pip
pip install aqtinstall

You are recommended to update pip before installing aqtinstall.

Note

aqtinstall depends several packages, that is required to download files from internet, and extract 7zip archives, some of which are precompiled in several platforms. Older pip does not handle it expectedly(see #230).

It may be difficult to set up some Windows systems with the correct version of Python and all of aqt's dependencies. To get around this problem, aqtinstall offers aqt.exe, a Windows executable that contains Python and all required dependencies. You may access aqt.exe from the Releases section, under "assets", or via the persistent link to the continuous build of aqt.exe.

Example

When installing Qt SDK 6.2.0 for Windows.

Check the options that can be used with the list-qt subcommand, and query available architectures:

aqt list-qt windows desktop --arch 6.2.0

Then you may get candidates: win64_mingw81 win64_msvc2019_64 win64_msvc2019_arm64. You can also query the available modules:

aqt list-qt windows desktop --modules 6.2.0

When you decide to install Qt SDK version 6.2.0 for mingw v8.1:

aqt install-qt windows desktop 6.2.0 win64_mingw81 -m all

The optional -m all argument installs all the modules available for Qt 6.2.0; you can leave it off if you don't want those modules.

To install Qt 6.2.0 with the modules 'qtcharts' and 'qtnetworking', you can use this command (note that the module names are lowercase):

aqt install-qt windows desktop 6.2.0 win64_mingw81 -m qtcharts qtnetworking

When aqtinstall downloads and installs packages, it updates package configurations such as prefix directory in bin/qt.conf, and bin/qconfig.pri to make it working well with installed directory.

Note

It is your own task to set some environment variables to fit your platform, such as PATH, QT_PLUGIN_PATH, QML_IMPORT_PATH, and QML2_IMPORT_PATH. aqtinstall will never do it for you, in order not to break the installation of multiple versions.

Testimonies

Some projects utilize aqtinstall, and there are several articles and discussions

History

This program is originally shown in Kaidan project as a name qli-installer. The aqtinstall project extend and improve it.