diff --git a/CHANGELOG.md b/CHANGELOG.md index 4258e50..eff7f5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## To be released ### Added +* Add a `pyqt5` extra for optional PyQt5 version compatibility constraints. * Add the `sip.SIP_ABI_VERSION` integer constant while retaining stubtest compatibility with older SIP versions. * [#192](https://github.com/python-qt-tools/PyQt5-stubs/pull/192) Add missing platform specific stubs: * Windows specific: QAxContainer.pyi QtWinExtras.pyi QtCore.QWinEventNotifier diff --git a/README.md b/README.md index 4b9548d..cf1013d 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,18 @@ appreciate any PRs or Issues that help making this stub-repository more reliable # Installation -Simply install PyQt5-stubs with pip: +Install the stubs with pip: $ pip install PyQt5-stubs +To opt into enforcement of any declared PyQt5 version compatibility constraints, +select the `pyqt5` extra: + + $ pip install "PyQt5-stubs[pyqt5]" + +The extra currently declares no PyQt5 version bounds. Selecting it may also +cause pip to install PyQt5 as a side effect of satisfying the dependency. + Or clone the latest version from Github and install it via Python setuptools: $ git clone https://github.com/python-qt-tools/PyQt5-stubs diff --git a/setup.py b/setup.py index 27784aa..91bc809 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,7 @@ def find_version(*file_paths): package_data={"PyQt5-stubs": ['*.pyi']}, packages=["PyQt5-stubs"], extras_require={ + "pyqt5": ["PyQt5"], "dev": ["mypy==0.930", "pytest<9", "pytest-xvfb"], }, classifiers=[