Skip to content

[patched-9] Backport recent changes from MeVisLab/pythonqt (Part 2) #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1ff9b77
[Backport] Handle QStringView et al as argument/return value
usiems Dec 8, 2023
29ea88f
[Backport generator] Filter out methods that do the same (at least in…
usiems Dec 8, 2023
ec40e12
[Backport generator] Add missing classes
usiems Dec 8, 2023
df5ab05
[Backport] Add "enum class" values to the enum type in Python
usiems Dec 8, 2023
5b4a6a9
[Backport] Escape reserved names by adding "_"
usiems Dec 8, 2023
3ca00bf
[Backport generator] Add QtOpenGLWidgets to masterinclude
mrbean-bremen Dec 12, 2023
ef51580
[Backport] Support QByteArrayView arguments + return values
usiems Dec 12, 2023
e75d9ac
[Backport generator] Suppress some methods of QByteArray and others...
usiems Dec 12, 2023
0df9882
[Backport generator] Fix misspelled attribute name
usiems Dec 12, 2023
2798ddd
[Partial Backport] Minor documentation fixes
mrbean-bremen Jan 1, 2023
9184165
[Backport] Minor documentation updates
mrbean-bremen Dec 13, 2023
de4b79c
[Backport generator] Move implementation from main.h into main.cpp
mrbean-bremen Dec 13, 2023
b58e3b0
[Backport generator] Replace INCLUDE by PYTHONQT_INCLUDE env var
mrbean-bremen Dec 13, 2023
d0e46f4
[Backport generator] More typesystem entries (added classes and rejec…
usiems Dec 14, 2023
92ef871
[Backport] Fix potential crash for unknown inner type
mrbean-bremen Dec 15, 2023
daaf0da
[Backport] Register container classes with bool
mrbean-bremen Dec 15, 2023
e687622
[Backport generator] Remove work-around for package spelling
usiems Dec 15, 2023
331a50f
[Backport] Create a global namespace wrapper for each package if requ…
usiems Dec 15, 2023
ce11938
[Backport] Add enum values to the enum type object itself in any case...
usiems Dec 20, 2023
ee7e541
[Backport] Added MinGW build documentation for MinGW
githubuser0xFFFF Sep 17, 2020
587dc2e
[Backport] Fix setting environment vars in readme (#63)
githubuser0xFFFF Dec 30, 2022
7379b9c
[Backport] Make sure the ubuntu artifacts do not overwrite each other
mrbean-bremen Nov 3, 2023
76d7da6
[Backport] Small documentation updates
usiems Dec 20, 2023
5cf6c94
Fix warning related to QSet::unite when building against Qt 5.15
jcfr Jan 31, 2024
162790a
Fix warning related to use of qrand() when building against Qt 5.15
jcfr Jan 31, 2024
e88a190
Re-introduce support for QMatrix when building against Qt < 6.0
jcfr Jan 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# PythonQt

[![License](https://img.shields.io/github/license/mevislab/pythonqt.svg?color=blue)](LICENSE)

PythonQt is a dynamic [Python](https://www.python.org) binding for [Qt](https://www.qt.io).
It offers an easy way to embed the Python scripting language into
your Qt applications.

# Documentation

API documentation is available at: https://mevislab.github.io/pythonqt

# Licensing

PythonQt is distributed under the `LGPL 2.1` license.

## Licensing of Generator

The build system of PythonQt makes use of a patched version of the LGPL'ed QtScript
generator, located in the `generator` directory.

Expand All @@ -26,3 +30,18 @@ The generated wrappers are pre-generated and checked-in, so you only
need to build and run the generator when you want to build additional wrappers
or you want to upgrade/downgrade to another Qt version, but this requires
updating the typesystems as well.

# Building

## Building on Windows with MinGW

To build PythonQt, you need to set the environment variable `PYTHON_PATH` to
point to the root dir of the python installation. Then you should set the
`PYTHON_VERSION` variable to the Python version number.

When using the prebuild Python installer, this will be:

```cmd
set PYTHON_PATH=c:\Python310
set PYTHON_VERSION=3.10
```
14 changes: 5 additions & 9 deletions build/python.prf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# profile to include and link Python


# Change this variable to your python version (2.6, 2.7, 3.3, ...)
# Change this variable to your python version (3.7, 3.8, ...)
isEmpty( PYTHON_VERSION ) {
PYTHON_VERSION=$$(PYTHON_VERSION)
}
isEmpty( PYTHON_VERSION ) {
PYTHON_VERSION=2.7
PYTHON_VERSION=3.10
}

isEmpty( PYTHON_DIR ) {
Expand Down Expand Up @@ -36,7 +36,7 @@ equals(PYTHON_VERSION_MAJOR, 2) {
}

contains(PKGCONFIG, "python.*"){
# If `pkg-config` is configured, use `qmake PKGCONFIG+=python3.8-embed CONFIG+=...`
# If `pkg-config` is configured, use `qmake PKGCONFIG+=python3.10-embed CONFIG+=...`
# or `PKGCONFIG+=python2.7m`-like form for older versions,
# see `pkg-config --list-all | grep python` for details.
# This can help with GNU/Linux (including macOS with Homebrew), MSYS2/MinGW environment,
Expand All @@ -54,16 +54,12 @@ contains(PKGCONFIG, "python.*"){
# for windows install a Python development kit or build Python yourself from the sources
# Make sure that you set the environment variable PYTHON_PATH to point to your
# python installation (or the python sources/header files when building from source).
# Make sure that you set the environment variable PYTHON_LIB to point to
# the directory where the python libs are located.
#
# When using the prebuild Python installer, this will be:
# set PYTHON_PATH = c:\Python26
# set PYTHON_LIB = c:\Python26\libs
# set PYTHON_PATH = c:\Python310
#
# When using the python sources, this will be something like:
# set PYTHON_PATH = c:\yourDir\Python-2.6.1\
# set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32
# set PYTHON_PATH = c:\yourDir\Python-3.10.12\

# check if debug or release
CONFIG(debug, debug|release) {
Expand Down
Loading