Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The SpecialCaseHandler supported only two file names: "CMakeLists.txt"
and "configure.cmake". Generalize the code to allow for arbitrary file
names. We will use this in a subsequent commit.
Change-Id: I0adada91409a11a369fd1cf2d6ab21cc8f28ba0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Don't needlessly show a bunch of special case debug messages
unless debugging is enabled.
There used to be a barrage of scary message when using
run_pro2cmake.
Change-Id: I49ab3522e11844a99653034b5f15a634a368d227
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
flake8 was used to evaluate the file, with a couple of exeptions:
E501,E266,W503
black was used to reformat the code automatically
The changes were:
* Added a README that explains how to use pipenv and pip,
* Remove unnecessary return statements,
* Remove '\' from the end of the lines,
* Use f-strings (>= 3.6) since we are requiring Python 3.7,
* Commenting unused variables,
* Adding assert when Python >= 3.7 is not being used,
* Wrapping long lines to 100 (Qt Style),
* Re-factoring some lines,
* Re-ordering imports,
* Naming `except` for sympy (SympifyError, TypeError)
Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
There were some issues with not finding the git executable and
trying to remove read-only files / files that are still held
by a process.
Change-Id: I7f587c4e96cff763cc0b3438d9ed2249da8f122f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
When using run_pro2cmake.py, it spawns multiple instances of
pro2cmake.py.
If more than 1 of the instances need to git add prev_CMakeLists.txt at
the same time, git add might fail due to the acquired index.lock.
The cleaner solution would be to use a file lock as a mutex, but that
requires an external pypi package.
Use a poor man solution of retrying the git add with a time delay for a
finite amount of times.
Change-Id: I2031f6e29ae499526cb4f1753e4387e7f4fab0ab
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Make sure to set the author user and email for the temporary git repo,
so that the commits succeed on systems that don't have a global git
author.
Also fix run_process_quiet to print stderr and stdout in case if the
execution failed for some reason.
Change-Id: I0ddb61730114b3e9c59e2d23480df0ced8d6e772
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The pro2cmake.py file is now smarter, and can reapply "special case"
modifications after regenerating a CMakeLists.txt file.
This substantially lowers the maintenance burden when regenerating
many files at once.
See the special_case_helper.py file for details on how it works.
Make sure to commit the generated .prev_CMakeLists.txt file alongside
your CMakeLists.txt changes.
To disable the preservation behavior, you can pass -s or
--skip-special-case-preservation to the script.
To keep around temporary files that are created during this process,
you can pass -k or --keep-temporary-files.
To get more debug output, pass --debug-special-case-preservation.
Fixes: QTBUG-75619
Change-Id: I6d8ba52ac5feb5020f31d47841203104c2a061d8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>