292 Commits

Author SHA1 Message Date
Juergen E. Fischer
4abd7ca3b1 generate pyproject.toml for bindings with cmake 2025-07-23 07:11:51 +10:00
Juergen E. Fischer
a4e018b73f make sure headers from external/ are only used when enabled (to allow
use of more up to date system nlohmann headers and not to use the
external meshoptimizer headers although the system's library ought to be
used)
2025-07-23 07:11:51 +10:00
Matthias Kuhn
9dcecb5442 New app layout 2025-06-05 13:51:12 +02:00
Even Rouault
c8861f748f [Build] Fix weird (invalid?) CMake construct that cause issues at least on some environments
Fixes #61887
2025-05-20 08:48:52 +10:00
Jean Felder
22380d2d1e
python/cmake: Fix 3d pyi file generation with SIP 4.X
the pyi names start with a '_'.

Trying to install a QGIS with the python support generated from SIP 4 fails with this error:

```
-- Set non-toolchain portion of runtime path of "/usr/local/share/qgis/python/qgis/_gui.so" to ""
CMake Error at python/cmake_install.cmake:142 (file):
  file INSTALL cannot find
  "/home/XXXX/build/output/python/qgis/_3d_p.pyi": No such file or
  directory.
Call Stack (most recent call first):
  cmake_install.cmake:72 (include)
```

This is because, the generated pyi file is named `3d_p.pyi` and not  `_3d_p.pyi`
This is fixed by adding the missing underscore.

Related: https://github.com/qgis/QGIS/pull/58562
Related: https://github.com/qgis/QGIS/pull/58534
2025-04-08 18:20:50 +02:00
Matthias Kuhn
340861dc00 Remove PY_2TO3
let's say welcome to 2025
2025-01-01 08:55:56 +09:00
Matthias Kuhn
c45b1f5c05 [cmake] Cleanup python libraries and includes 2024-12-31 10:45:27 +01:00
t0b3
57ec4277f5 clean up SIP_INCLUDE_DIR redundancy
See d0c4e0de9d

this line is only used with SIP v4 which already is included below
2024-12-27 07:01:53 +09:00
Juergen E. Fischer
8825f861dd fix sid build with sip 6.9.1 2024-12-23 11:57:01 +01:00
Julien Cabieces
0a42c57a4b build(QSci): fix build when python QSci is missing 2024-12-17 09:05:46 +01:00
Even Rouault
5665665712 Fix CMake 3.31 warnings 2024-12-04 06:50:16 +10:00
Simon Lopez
c06c7c938e Use CMake's SQLite targets
This uses the same targets and variables introduced in
the FindSQLite3 module in CMake starting with version 3.14.

The other CMakeFiles.txt are modified accordingly.
2024-09-13 20:59:46 +02:00
Juergen E. Fischer
640f2801f2 fix 3d.pyi install (followup da317dd8dea0)
$ find build -name "*3d*.pyi"
build/python/3d/build/_3d_p/_3d_p.pyi
2024-09-04 05:26:12 +10:00
Nyall Dawson
da317dd8de
Fix PyQGIS 3D module patching
The module patching for _3d was not working at all, because
the same logic which works for other modules with a private _module
copy clashed with the approach of exposing the public 3d module
as qgis._3d

Work around this by renaming the private internal module as _3d_p,
so that the monkey patching logic from sip is correctly run
when the module is loaded.

Fixes broken API in 3d module for renamed enums, and fixes the
broken PyQGIS doc for the 3d module
2024-08-30 11:57:42 +10:00
Denis Rouzaud
5166fc7a51
fix class map install (#58200)
* fix class map install

* fix path
2024-07-22 13:20:18 +02:00
Denis Rouzaud
6e9933145a
Adds a file to hold a map from class/method to headerfile (#58054)
* create map file for class / header files for PyQGIS API docs

* create map files

* install file

* add line numbers

* also add methods

* wait to sort

* more methods

* fix CMakeLists install

* fix sorting

* fix spell check

* remove map files for Qt6

* Revert "remove map files for Qt6"

This reverts commit 972f483410f556d1735a2070943b8ad9e2522c5e.

* do not test class_map files + auto sipify_all on branches

* fix warning
2024-07-16 11:40:25 +02:00
Nyall Dawson
ff56801b8f Create QgsWebEnginePage wrapper class around QWebEnginePage
Like QgsWebPage this provides additional functional over the
base Qt class to simplify tasks required in QGIS.
2024-02-12 12:48:27 +10:00
Jorge Tornero
9195dbd057
Support for serial port sensor baudrate selection (#55848) 2024-02-06 13:53:11 +07:00
Mathieu Pellerin
185724f892 Make QtPrinter support non-mandatory 2024-01-22 11:07:34 +10:00
Julien Cabieces
3e27ac5985 [PyQt6] Build PyQt6 2024-01-16 12:18:11 +10:00
Julien Cabieces
0884f5c0ce Build PyQt6 with c++ 17 2023-12-12 09:36:27 +10:00
bdm-oslandia
2d64df22a4 fix(python/CMakeLists.txt): be sure we only use std 14 for python (not std 17) 2023-10-22 10:53:43 +10:00
Nicklas Larsson
021f919f24
cmake: update to find PDAL 2.6+
With PDAL 2.6 the 'pdal_util' library is removed as a separate library
and hence part of the 'pdalcpp' library.
2023-10-17 19:41:44 +02:00
Matthias Kuhn
2c8e784625
Use geos cmake configuration (#54659) 2023-09-19 20:10:15 +00:00
Matthias Kuhn
55593bdbb3 Cleanup GDAL_INCLUDE_DIR 2023-09-18 19:02:53 +02:00
Nyall Dawson
f86e46ed7a Add optional WITH_QTGAMEPAD cmake switch, and create 2d/3d gamepad
map controller classes which expose QGamepad functionality

Especially handy because the underlying QGamepad classes
are not accessible to Python
2023-06-27 14:49:20 +10:00
Chris Mayo
ecdb1e2989 Fix build with WITH_BINDINGS=yes and WITH_QTSERIALPORT=no
auto_generated/sensor/qgsabstractsensor.sip: In function ‘const sipTypeDef* sipSubClass_QgsAbstractSensor(void**)’:
auto_generated/sensor/qgsabstractsensor.sip:35: error: ‘QgsSerialPortSensor’ does not name a type; did you mean ‘sipName_QgsSerialPortSensor’?
2023-06-26 08:24:43 +10:00
Alexander Bruy
ed1378b527 do not require PDAL >= 2.5 for QGIS, make it requirement only for
processing provider
2023-03-22 16:04:01 +01:00
Alexander Bruy
21a16e4d3c add Processing provider for PDAL algorithms 2023-03-22 16:04:01 +01:00
Nyall Dawson
8dd4b005e0 Fix handling of QSci pap file when running directly from build dir 2023-01-30 13:58:48 +10:00
Juergen E. Fischer
e8cec91091 fix mingw build 2023-01-27 04:36:20 +01:00
Juergen E. Fischer
19d7edcfed produce and install pyqgis.pap (superceeds #51429) 2023-01-25 23:06:35 +01:00
Franck HOUSSEN
a33e2bcef9 [BUG FIX] Fix compilation on debian:
In file included from /path/to/QGIS/build/python/core/auto_generated/pointcloud/qgspointcloudlayerexporter.sip:242:
/path/to/QGIS/src/core/pointcloud/qgspointcloudlayerexporter.h:28:10: fatal error: pdal/PointView.hpp: No such file or directory
   28 | #include <pdal/PointView.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
2022-12-16 16:57:53 +01:00
Sandro Mani
ff9f2833d0 Assorted fixes towards PyQt6 support 2022-11-30 10:13:52 +01:00
Nyall Dawson
51e3c0833b Sip update 2022-08-12 20:36:07 +10:00
Nyall Dawson
9e19ec3a22 Try to fix version detection 2022-05-12 19:58:04 +10:00
Nyall Dawson
86f7d4e89e [api] Add QgsCombinedStyleModel class, for combining entities from several
QgsStyle models into a single combined view
2022-05-12 19:58:04 +10:00
Juergen E. Fischer
bc757fe331 also build pyi with sip-build (followup 6fd34ca92b3e2bc) 2021-10-04 12:56:23 +02:00
Sandro Mani
c5bb41dc01 PyQt5 cmake improvements 2021-09-30 12:13:29 +02:00
Sandro Mani
6fd34ca92b Add sip5/sip6 sip-build support 2021-09-24 08:56:40 +10:00
Denis Rouzaud
437b3efb92 disable feature earlier 2021-06-24 15:13:46 +02:00
Denis Rouzaud
51f25b7df9 fix SIP feature 2021-06-24 11:48:49 +02:00
Matthias Kuhn
ff3be3df40 Remove QTMOBILITY
It's days are gone
2021-06-19 06:20:57 +10:00
Juergen E. Fischer
f8e2adb84c install and package pyis (fixes #41264) 2021-06-10 00:43:05 +02:00
nirvn
0008158ab0 Allow GSL-less qgis analysis library 2021-06-01 11:39:21 +07:00
Denis Rouzaud
da08c8a435
[cmake] generalize Python output directory in UseTest macro (#43191)
* [cmake] generalize Python output directory in UseTest macro

this is helpful in case we set up another python output directory (eg PySide2)

* define python output directories to the parent scope

* try with target_include_directories

* define vars on top level

* Update UsePythonTest.cmake

* some cleanup

* more cleanup

* fix uic

* fix path for all platforms

* fix var
2021-05-13 07:32:03 +02:00
Denis Rouzaud
555f516925
use cmake native FindPython (#42497) 2021-03-28 21:49:40 +02:00
Nyall Dawson
bb76b6bf37 Add an extremely horrible hack to allow the python bindings to build
on gcc11

Don't blame me, blame sip
2021-03-27 09:48:59 +10:00
Nyall Dawson
8bf253d6ef Move classes representing GCP based transformations from app to analysis,
and make ready for exposure to public API
2021-02-21 15:18:57 +10:00
Denis Rouzaud
76a2869211 remove includes of binary dirs 2021-01-14 08:09:36 +10:00