| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Get basename of a path using pathlib.Path.name.
Enable PL119 in flake8.
Update copyright year for changed files.
Change-Id: Ice7cd7e9246950dd39321b108bb68c9466f62189
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
| |
Rewrite runner.py
Follow up patch: run_command from bld_utils.py
Requires following patch in 6cc08ee72a7eb1860bb2f982879ff71c6dda2e10
Change-Id: I984046f56d4faac8ac58f12d0dad07d7bae4b0a2
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 64b709d4b422e6d59f9e703fbc1124dd3f77d556.
Reason for revert: required dependent changes are done, we can bring this change back
Change-Id: I1692b433eda3fd2a1e5aa541785dae942cbd1665
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
| |
This reverts commit bd38f3c2897c3f82f8c10464f70ed301c618dae7.
Reason for revert: temporarily revert due to colorlog import issues
Change-Id: I8e47743780c8998580ca40de56cbe0d0b5f49504
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Remove inconsistent print function/logging module usage across scripts
-Initialize logger from logging_util.py
-Use CI friendly format in logging to stdout
-Log file format with extra debug information (script, line, process)
-Remove rainbow_logging_handler in favor of colorlog
-Remove unnecessary print/log functions from unit tests
-Remove unnecessary whitespace in logging messages
Change-Id: Ib913cf2f6a2b02e06628f94dceeeaf845191b96b
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
| |
Enable --strict parameter in mypy.
Add missing type hints and resolve remaining type errors.
Change-Id: Id9547cc3351b88729930c577d4ed628780c1447b
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
| |
Add this check and rename variables.
Change-Id: I95b933bcf0834bcb8f0c3cda92090ce1d481d398
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
| |
Enable this check and rename function arguments to be PEP8 compliant.
Change-Id: Ia75f66decdab75197335b1cff5f87c6f25b0d259
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
| |
Enable this check and rename functions.
Change-Id: Ifc6c3248f6c6b90a240d66bb2d20cd716d887729
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
-Move code from module scope to main() functions where it makes sense
-Pass module variables as arguments to functions that used them
Linters will complain about naming clashes in outer scope if same name
is used in a function.
Change-Id: I1319cf1632f94907ee918e6f7593c79b0909e48b
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
| |
This function is not needed.
Change-Id: I533451c24f6bad9e497be190aa2c130318bfff4c
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Some function calls were still passing callerArguments to runCommand
Finish callerArguments cleanup
Change-Id: I5fbc7f396557d6bd9385f9d64c802804acad9551
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable pylint checks, and fix the following anti-patterns:
- superfluous-parens
- no-else-return, no-else-raise, no-else-break, no-else-continue
- unnecessary-comprehension
- pointless-statement, pointless-string-statement
- unnecessary-pass, useless-return
- unused-variable, unused-argument
- useless-object-inheritance
- condition-evals-to-constant
- simplifiable-if-expression
- redundant-unittest-assert
Requires to be submitted with the following change in tqtc-qtsdk:
251649c633eb7acc417cf88fd1c7f885e2bccd7b
Change-Id: I3dd50a7030e06565ae6c04d0a0e3aa07bc68218f
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Enable following checks in pylint:
- C0209: Formatting a regular string which could be a f-string
- W1202: Use lazy % formatting in logging functions
- W1203: Use lazy % formatting in logging functions
Use f-string for string formatting where recommended and lazy % formatting in logging.
Change-Id: I14924d27e0f800c47af1ec903be4c51f24191d26
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Add isort to Pipfile, isort hook with blackformatter profile
-Fix imports in unittest hook
-Group and sort imports by their category (PEP8)
-Blank line between import groups (PEP8)
-Move all imports to toplevel (PEP8)
-Don't unnecessarily append to sys.path (PEP8)
-Import only required functions (this also helps reduce line length)
-Update deprecated imports such as builtins.WindowsError, ConfigParser.readfp
-Remove Python 2, cyclic and unused imports
-Fix platform dependent imports and remove unnecessaty try-excepts
-Remove unnecessary comments before imports, use in-line comments when needed
-Rename conflicting functions in imports, variables as absolute imports are recommended (PEP8)
Change-Id: I5ac7a3499ea47a6bdc9a9a2b5211841f65c011ea
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable flake8 indentation related checks and fix indentation:
- E123 Closing bracket does not match indentation of opening bracket's line
- E126 Continuation line over-indented for hanging indent
- E128 Continuation line under-indented for visual indent
- E125 Continuation line with same indent as next logical line
- E117 Over-indented
- E124 Closing bracket does not match visual indentation
- E127 Continuation line over-indented for visual indent
- E111 Indentation is not a multiple of four
- E121 Continuation line under-indented for hanging indent
Change-Id: I2f25ed06d229b8fdaf94d69fa080dc1178ff3a2d
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix whitespace, Enable following checks in flake8:
- E225 Missing whitespace around operator (E225)
- E226 Missing whitespace around arithmetic operator (E226)
- E231 Missing whitespace after ',', ';', or ':' (E231)
- E221 Multiple spaces before operator (E221)
- E201 Whitespace after '(' (E201)
- E252 Missing whitespace around parameter equals
- E251 Unexpected spaces around keyword / parameter equals
- E202 Whitespace before ')' (E202)
- E222 Multiple spaces after operator (E222)
- E211 Whitespace before '(' (E211)
Change-Id: Ib14a4a83dbc06cdfac511eb09912d7b9232df7e6
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct the amount of lines in function and class definitions as well as
at the end of the file. Enable following flake8 checks:
- E301 Expected 1 blank line, found 0
- E302 Expected 2 blank lines, found 0
- E303 Too many blank lines
- E305 Expected 2 blank lines after end of function or class
- E306 Expected 1 blank line before a nested definition
- W391 Blank line at end of file
Change-Id: Ia9bb511ded47df1f43bfffa4be00abfdbda60cae
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable following checks in flake8, and fix the resulting errors:
-F401 Module imported but unused
-F841 Local variable name is assigned to but never used
-F811 redefinition of unused module
-F541 (f-string is missing placeholders)
-F523 .format(...) unused positional arguments
Change-Id: Iba0e9f0148054d86b39b31202aba81a7f5c03a93
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change block and inline comments to be PEP8 compliant.
(Note: line lengths will be enforced in a separate patch)
Add pre-commit hook for flake8, and enable only checks relevant
to this patch:
- E265 Block comment should start with '# '
- E266 Too many leading '#' for block comment
- E261 At least two spaces before inline comment
- E262 Inline comment should start with '# '
- E115 expected an indented block (comment)
Change-Id: I0218772bfbea514b4a0d8ecc461845c4563396da
Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Update year and license header
-Update header formatting to match others in send_header_diff_kmail.py
-Change "## " to "# " in license headers to make them PEP8 compliant.
-Reference: https://peps.python.org/pep-0008/#block-comments
-flake8 rule descriptions and codes:
-Block comment should start with '# ' (E265)
-Too many leading '#' for block comment (E266)
Change-Id: Ife039694462e9908bc22ab253ba3202c7245a7a3
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Moving this function since runner.py already has similar functionality
so it makes more sense to have it there.
Change-Id: Iedd4a5ba050a917258f303c21ae0edf4c30b5915
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Remove following functions from bldinstallercommon.py
-make_files_list
-delete_files_by_type_recursive
-locate_file
-locate_directory
-is_executable
-Refactor locate_executable, search_for_files
-Add functions locate_path, locate_paths that use pathlib.rglob
-Add unit test for search_for_files
Change-Id: I39d2d672c6088181a1adba5cf7ce1b93426e4e43
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
| |
Remove create_dirs(). Use mkdir function provided by pathlib.
Having a separate function for this doesn't make sense.
Change-Id: Idb486657f9c3c79b56c81a4718b8d68d8a64a68f
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current way of using bldinstallercommon is cumbersome.
The bldinstallercommon "requires" initialization which in turn sets up
global variables for current platform.
Put the conviniency functions:
is_windows()
is_macos()
is_linux()
into bld_utils.py which should serve as a place where remainder of the
utilities can go. The bldinstallercommon needs to be split into separate
files/modules per functionality in the long term.
Remove also Solaris support and IFW cross-compilation support which
are no longer needed.
Change-Id: Iecafac7e658ca05223b073ad551007fa7187fb0b
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
| |
This reverts commit ac6f75fce1b3c08eeb7dac541c80d35a11ef5cc6.
Reason for revert: issue with windows offline build
Change-Id: Ide6c7f035c16e0578b857ba848355c0e3779325e
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
| |
Use shutil.rmtree. Add onerror handler function.
Change-Id: I97bd6efcc0c9328d0105399ccf55484ae70c6b5c
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name was wrong and it was always used as a dict
with extra environment keys/variables.
Not sure why the before python3 refactor code worked,
but this brings back the old behavior that these extra
variables are overwritting exsting ones.
Change-Id: I780cf477995f613e94c6c21116460f58af859972
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Patrik Teivonen <patrik.teivonen@qt.io>
|
|
|
|
|
|
|
|
| |
Initial port for build_wrapper.py and related scripts
Change-Id: Icdf24193462e1a4746868782bd2ff95cd347b1ad
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
|
|
|
|
|
|
|
|
|
| |
The sys.exit terminates just the current thread. This is an issue
if using the threadedwork.py with multiple threads as any failure
should terminate the whole script.
Change-Id: I9926c4cf9c6754a5182d331dae5a2e66c5ff95b6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: I1bcb0bfa9822e4bc9096fd4825342b43c2c2ec15
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I2a67d209db589108c8b89c86496bc616c86e7c8f
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, using 7zip in parallel to unzip into the same directory
regularly fails. It checks whether a directory exists and creates it
if not. Creating directories fails if the directory already exists.
So, if a different process (e.g. different 7z) creates the directory
between the check for existence and the creation, the latter fails.
Split the Qt download and extract into a parallel download phase
and a sequential extract phase.
Change-Id: I2e8f841a467267815ad2338b12cc0f388f8e8e57
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Iba6a8467a8840d6d1e8e4a936c3a6ed87ff765cb
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Depending on the module, it might write paths relative to its install
path, not the Qt install path.
Change-Id: Idbb676f44850d985347438042edf2cc6eee9ab38
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
- There is no need for a complicated search for qmake
- With "qmake -query <VAR>" it is possible to get just the value for the
wanted variable
Change-Id: I72387406e5c05aa7343dab37fda3639adcac8ade
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
At archiving phase this was hardcoded to have last path component
"qt5_package_dir" which doesn't work when using any other --qt5path
Change-Id: I7854884d3b58f5864a5aa26cf1c004333e19de7e
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
| |
Use os.path.join and also simplify dir_to_archive usage
Change-Id: Iaf27f21c7fc16542175a590d93e3a6cd4c6a7f12
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
- No need for multiple if is_win_platform
- Wrongly placed comment about stripping drive letter
- There is os.path.dirname for getting the directory name
Change-Id: Id28bc7f2328c004dd399c9cea6764287b9189d23
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I35d1b30648386c5e7e4077a43df772e5b13ebf98
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I827a8a28de4d19add1fa3475bf633d5823af2264
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- No need to define makeCommand or installCommand, since
callerArguments.buildcommand/installcommand default to 'make' anyhow
- Use bld_utils.runBuildCommand and bld_utils.runInstallCommand where
appropriate
- Prefer arrays for the command. That is much safer since otherwise
argument splitting is always done at whitespace (and then whitespace
cannot be part of an argument)
Change-Id: I3c708370f81407546224e21ab7252b992f82e30c
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
It was duplicated between bld_module and bld_qtcreator, and will
probably be interesting for later things as well.
Change-Id: Iaab7cd84d01f5f7a35eb0511a5e014c38e01a258
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Getting and extracting works exactly the same way for different Qt
modules, so we can get rid of some duplicated code by using an argument
that can appear multiple times, and iterating over it.
Change-Id: I87c7696b045077dd7f727d9f2f644e375406706e
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- the targetPath was not actually used in these places
- we don't use the installer framework for patching on OS X anymore, so
we don't need to fetch it
- INSTALLER_ARCHIVE is a leftover from copying from the Qt Creator
build, here we archive manually without the need for that environment
variable
- keychain unlock script and SIGNING_IDENTITY are leftovers from the Qt
Creator build
Change-Id: Ida678d4192b3a5f97233e68fa7b2b78b56f97d22
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
|
|
|
|
|
| |
From bld_module and bld_qtcreator
Change-Id: I18446f8c1f593562d319e5b1d73417f3e3bdac48
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|
Rename "*application*" and "*extra*" as "module" in packaging scripts
to better reflect the actual usage.
Cleanup environment variable usage in packaging scripts:
- Removed unused envrironment variables.
- Renamed some environment variables as similar already existed
- Removed deprecated envrironment setup helper scripts
Change-Id: Ie4bcdd67febe42f3b9f718db98e06a552d0d79e5
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|