Commit Graph

9 Commits

Author SHA1 Message Date
David Schulz
4c20a880e6 Python: remove python specific language client settings
Change-Id: Ic993d525f29c1925f7e64dfc6f5e053234fb4904
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:47:23 +00:00
David Schulz
ed22ef7854 Python: globalize Python language server settings
Change-Id: I84fcee6462064f0c788492fcfa12a77379af2bd7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:40:43 +00:00
hjk
28cfdf388a Promote previously python-specific InterpreterAspect
... and drop PythonRunConfiguration, which is a plain RunConfiguration now.

Change-Id: I540cb738180fc1424f730d6d1998886915ce527b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-27 08:54:22 +00:00
David Schulz
d0c8cc20f5 Python: automatically purge outdated autodetected interpreters
Save whether an interpreter was automatically detected. Use this
information on startup and check whether the path still exists to remove
the interpreters that are gone.

Fixes: QTCREATORBUG-27253
Change-Id: I094e573122f2800f643a2708b924a7a9d7e25ae1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-31 10:43:42 +00:00
David Schulz
7cb3a726d4 Python: add PySide installation check on document open
Checks if the document imports PySide and whether the selected python
interpreter can find a PySide installation. If not show a global info
bar that can install PySide via pip like the python lsp server.

Task-number: PYSIDE-1742
Change-Id: I02c0d5f6eb268f3d8826d4fb9d9ec3c7c48b8638
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 12:15:15 +00:00
Christian Stenger
b2ede6ff51 Python: Check for changes before applying
Storing the python settings seems to be rather costly
and may take some time.
Perform an early return if nothing has changed.

Change-Id: I509e83f503d2af31a7464df893e0e4e69e99a277
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-10-30 13:21:29 +00:00
David Schulz
6664d78ded Python: detect virtual environments for documents and projects
After opening a document or project the directory hierarchy is looked up
for a Scripts/(activate && python.exe) on windows or bin/(activate &&
python) on unix. This is the usual structure of python virtual
environments. If such a folder is found add the python from that folder
to the list of configured interpreters in the settings, set it as the
current interpreter for the project and try to open the corresponding
language server.

Change-Id: I038c309ea2988f9370194330d250d1515beac0a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-30 08:46:12 +00:00
David Schulz
95bd328c31 Python: export Interpreter generator
Change-Id: I591bd6c14706e1699f028a9a3a6dfd9b89eec66a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-25 12:50:46 +00:00
David Schulz
a99e5af1da Python: make interpreter configurable
Add settings page to setup python interpreter and use a combo box in the
run configuration to switch between those configured interpreter.

Change-Id: I51014b785ea822ee138d39c788149f1d22901e55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-30 07:41:30 +00:00