Skip to content

Commit dc7b0e4

Browse files
committed
Dropped support for PyQt4, PySide2, Python <3.8
1 parent 61ad3db commit dc7b0e4

20 files changed

+183
-303
lines changed

.github/workflows/python-package-PyQt5.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
python -m pip install --upgrade pip
3737
python -m pip install flake8 pytest
3838
pip install PyQt5 qtpy numpy
39-
python setup.py install
39+
pip install .
4040
- name: Lint with flake8
4141
run: |
4242
# stop the build if there are Python syntax errors or undefined names

.github/workflows/python-package-PyQt6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python -m pip install --upgrade pip
3838
python -m pip install flake8 pytest
3939
pip install PyQt6 qtpy numpy
40-
python setup.py install
40+
pip install .
4141
- name: Lint with flake8
4242
run: |
4343
# stop the build if there are Python syntax errors or undefined names

.github/workflows/python-package-PySide6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python -m pip install --upgrade pip
3838
python -m pip install flake8 pytest
3939
pip install PySide6 qtpy numpy
40-
python setup.py install
40+
pip install .
4141
- name: Lint with flake8
4242
run: |
4343
# stop the build if there are Python syntax errors or undefined names

.vscode/tasks.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,36 @@
201201
"dependsOrder": "sequence",
202202
"dependsOn": [
203203
"Clean Up",
204-
"Take screenshots",
205-
"Build documentation"
206204
]
207205
},
206+
{
207+
"label": "Run test venv",
208+
"type": "shell",
209+
"command": "cmd",
210+
"options": {
211+
"cwd": "scripts",
212+
"env": {
213+
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
214+
"UNATTENDED": "1"
215+
}
216+
},
217+
"args": [
218+
"/c",
219+
"run_test_venv.bat"
220+
],
221+
"problemMatcher": [],
222+
"group": {
223+
"kind": "build",
224+
"isDefault": true
225+
},
226+
"presentation": {
227+
"echo": true,
228+
"reveal": "always",
229+
"focus": false,
230+
"panel": "shared",
231+
"showReuseMessage": true,
232+
"clear": true
233+
},
234+
},
208235
]
209236
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# PythonQwt Releases
22

3+
## Version 0.11.0
4+
5+
- Dropped support for Python 3.7 and earlier.
6+
- Dropped support for PyQt4 and PySide2.
7+
38
## Version 0.10.6
49

510
- Qt6 support:

MANIFEST.in

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
recursive-include doc *.py *.rst *.png
2-
include MANIFEST.in
3-
include LICENSE
4-
include README.md
5-
include CHANGELOG.md
1+
graft doc
2+
include *.desktop

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ for more details on API limitations when comparing to Qwt.
8989

9090
The `qwt` package short-term roadmap is the following:
9191

92-
- [ ] Drop support for PyQt4 and PySide2
93-
- [ ] Drop support for Python < 3.8
94-
- [ ] Replace `setup.py` by `pyproject.toml`, using `setuptools` (e.g. see `guidata`)
92+
- [X] Drop support for PyQt4 and PySide2
93+
- [X] Drop support for Python < 3.8
94+
- [X] Replace `setup.py` by `pyproject.toml`, using `setuptools` (e.g. see `guidata`)
9595
- [ ] Add more unit tests: the ultimate goal is to reach 90% code coverage
9696

9797
## Dependencies
9898

9999
### Requirements
100100

101-
- Python >=3.4
102-
- PyQt4, PyQt5, PyQt6 or PySide6
101+
- Python >=3.8
102+
- PyQt5, PyQt6 or PySide6
103103
- QtPy >= 1.3
104104
- NumPy >= 1.5
105105

@@ -113,7 +113,7 @@ The `qwt` package short-term roadmap is the following:
113113
From the source package:
114114

115115
```bash
116-
python setup.py install
116+
python -m build
117117
```
118118

119119
## Copyrights

doc/installation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ Dependencies
55
------------
66

77
Requirements:
8-
* Python 3.x (x>=6)
9-
* PyQt4 4.x (x>=4), PyQt5 5.x (x>=5), PyQt6 or PySide6
10-
* QtPy >= 1.3
11-
* NumPy 1.x (x>=5)
12-
* Sphinx 1.x (x>=1) for documentation generation
8+
* Python 3.8 or higher
9+
* PyQt5 5.15, PyQt6 or PySide6
10+
* QtPy 1.9 or higher
11+
* NumPy 1.21 or higher
12+
* Sphinx for documentation generation
1313
* pytest, pytest-cov, pytest-qt, coverage for unit testing
1414

1515
Installation
1616
------------
1717

1818
From the source package:
1919

20-
`python setup.py install`
20+
`python -m build`
2121

2222
Help and support
2323
----------------

doc/overview.rst

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ Overview
1313
The ``PythonQwt`` package consists of a single Python package named
1414
`qwt` and of a few other files (examples, doc, ...):
1515

16-
- The subpackage `qwt.qt` handles compatibility features between PyQt4, PyQt5 and PySide
17-
(source code strongly inspired from the Spyder project).
18-
1916
- The subpackage `qwt.tests` contains the PythonQwt unit tests:
2017

2118
- 75% were directly adapted from Qwt/C++ demos (Bode demo, cartesian demo, etc.).
@@ -24,61 +21,61 @@ The ``PythonQwt`` package consists of a single Python package named
2421

2522
- The test launcher is an exclusive PythonQwt feature.
2623

27-
The `qwt` package is a pure Python implementation of `Qwt` C++ library
24+
The `qwt` package is a pure Python implementation of `Qwt` C++ library
2825
with the following limitations.
2926

3027
The following `Qwt` classes won't be reimplemented in `qwt` because more
31-
powerful features already exist in `guiqwt` (and in the forthcoming `plotpy` library,
32-
resulting of the merge of `guidata` and `guiqwt`): `QwtPlotZoomer`,
28+
powerful features already exist in `guiqwt` (and in the forthcoming `plotpy` library,
29+
resulting of the merge of `guidata` and `guiqwt`): `QwtPlotZoomer`,
3330
`QwtCounter`, `QwtEventPattern`, `QwtPicker`, `QwtPlotPicker`.
3431

35-
Only the following plot items are currently implemented in `qwt` (the
36-
only plot items needed by `guiqwt` and `plotpy`): `QwtPlotItem` (base class),
32+
Only the following plot items are currently implemented in `qwt` (the
33+
only plot items needed by `guiqwt` and `plotpy`): `QwtPlotItem` (base class),
3734
`QwtPlotItem`, `QwtPlotMarker`, `QwtPlotSeriesItem` and `QwtPlotCurve`.
3835

39-
The `HistogramItem` object implemented in PyQwt's HistogramDemo.py is not
40-
available here (a similar item is already implemented in `guiqwt`/`plotpy`). As a
41-
consequence, the following classes are not implemented: `QwtPlotHistogram`,
36+
The `HistogramItem` object implemented in PyQwt's HistogramDemo.py is not
37+
available here (a similar item is already implemented in `guiqwt`/`plotpy`). As a
38+
consequence, the following classes are not implemented: `QwtPlotHistogram`,
4239
`QwtIntervalSeriesData`, `QwtIntervalSample`.
4340

44-
The following data structure objects are not implemented as they seemed
45-
irrelevant with Python and NumPy: `QwtCPointerData` (as a consequence, method
41+
The following data structure objects are not implemented as they seemed
42+
irrelevant with Python and NumPy: `QwtCPointerData` (as a consequence, method
4643
`QwtPlot.setRawSamples` is not implemented), `QwtSyntheticPointData`.
4744

48-
The following sample data type objects are not implemented as they seemed
49-
quite specific: `QwtSetSample`, `QwtOHLCSample`. For similar reasons, the
50-
`QwtPointPolar` class and the following sample iterator objects are not
45+
The following sample data type objects are not implemented as they seemed
46+
quite specific: `QwtSetSample`, `QwtOHLCSample`. For similar reasons, the
47+
`QwtPointPolar` class and the following sample iterator objects are not
5148
implemented: `QwtSetSeriesData`, `QwtTradingChartData` and `QwtPoint3DSeriesData`.
5249

53-
The following classes are not implemented because they seem inappropriate in
54-
the Python/NumPy context: `QwtArraySeriesData`, `QwtPointSeriesData`,
50+
The following classes are not implemented because they seem inappropriate in
51+
the Python/NumPy context: `QwtArraySeriesData`, `QwtPointSeriesData`,
5552
`QwtAbstractSeriesStore`.
5653

5754
Threads:
5855

59-
- Multiple threads for graphic rendering is implemented in Qwt C++ code
60-
thanks to the `QtConcurrent` and `QFuture` Qt features which are
56+
- Multiple threads for graphic rendering is implemented in Qwt C++ code
57+
thanks to the `QtConcurrent` and `QFuture` Qt features which are
6158
currently not supported by PyQt.
6259

6360
- As a consequence the following API is not supported in `PythonQwt`:
6461
- `QwtPlotItem.renderThreadCount`
6562
- `QwtPlotItem.setRenderThreadCount`
6663
- option `numThreads` in `QwtPointMapper.toImage`
6764

68-
The `QwtClipper` class is not implemented yet (and it will probably be
69-
very difficult or even impossible to implement it in pure Python without
70-
performance issues). As a consequence, when zooming in a plot curve, the
71-
entire curve is still painted (in other words, when working with large
65+
The `QwtClipper` class is not implemented yet (and it will probably be
66+
very difficult or even impossible to implement it in pure Python without
67+
performance issues). As a consequence, when zooming in a plot curve, the
68+
entire curve is still painted (in other words, when working with large
7269
amount of data, there is no performance gain when zooming in).
7370

74-
The curve fitter feature is not implemented because powerful curve fitting
71+
The curve fitter feature is not implemented because powerful curve fitting
7572
features are already implemented in `guiqwt`/`plotpy`.
7673

7774
Other API compatibility issues with `Qwt`:
7875

79-
- `QwtPlotCurve.MinimizeMemory` option was removed as this option has no
80-
sense in PythonQwt (the polyline plotting is not taking more memory
76+
- `QwtPlotCurve.MinimizeMemory` option was removed as this option has no
77+
sense in PythonQwt (the polyline plotting is not taking more memory
8178
than the array data that is already there).
8279

83-
- `QwtPlotCurve.Fitted` option was removed as this option is not supported
80+
- `QwtPlotCurve.Fitted` option was removed as this option is not supported
8481
at the moment.

pyproject.toml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# PythonQwt setup configuration file
2+
3+
[build-system]
4+
requires = ["setuptools"]
5+
build-backend = "setuptools.build_meta"
6+
7+
[project]
8+
name = "PythonQwt"
9+
authors = [{ name = "Pierre Raybaut", email = "pierre.raybaut@gmail.com" }]
10+
description = "Qt plotting widgets for Python"
11+
readme = "README.md"
12+
license = { file = "LICENSE" }
13+
classifiers = [
14+
"Topic :: Scientific/Engineering",
15+
"Topic :: Scientific/Engineering :: Visualization",
16+
"Topic :: Software Development :: Widget Sets",
17+
"Topic :: Software Development :: Libraries :: Python Modules",
18+
"Topic :: Utilities",
19+
"Topic :: Scientific/Engineering",
20+
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
21+
"Topic :: Software Development :: User Interfaces",
22+
"Operating System :: MacOS",
23+
"Operating System :: Microsoft :: Windows",
24+
"Operating System :: OS Independent",
25+
"Operating System :: POSIX",
26+
"Operating System :: Unix",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
]
33+
requires-python = ">=3.8, <4"
34+
dependencies = ["NumPy>=1.21", "QtPy>=1.9"]
35+
dynamic = ["version"]
36+
37+
[project.urls]
38+
Homepage = "https://github.com/PlotPyStack/PythonQwt/"
39+
Documentation = "https://PythonQwt.readthedocs.io/en/latest/"
40+
41+
[project.gui-scripts]
42+
PythonQwt-tests = "qwt.tests:run"
43+
44+
[project.optional-dependencies]
45+
dev = ["black", "isort", "pylint", "Coverage"]
46+
doc = ["PyQt5", "sphinx>6", "python-docs-theme"]
47+
test = ["pytest", "pytest-cov", "pytest-qt", "pytest-xvfb"]
48+
49+
[tool.setuptools.packages.find]
50+
include = ["qwt*"]
51+
52+
[tool.setuptools.package-data]
53+
"*" = ["*.png", "*.svg", "*.mo", "*.cfg", "*.toml"]
54+
55+
[tool.setuptools.dynamic]
56+
version = { attr = "qwt.__version__" }

0 commit comments

Comments
 (0)