Skip to content

Commit 2583303

Browse files
authored
Merge pull request #94 from altendky/add_qt6
2 parents a008071 + 4afcf10 commit 2583303

21 files changed

+402
-230
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
src/pyqt5_tools/_version.py export-subst
1+
src/pyqt_tools/_version.py export-subst

.github/workflows/ci.yml

+130-20
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,63 @@ jobs:
3838
action: 3.8
3939
docker: 3.8
4040
qt:
41-
- pyqt_version: 5.14.0
41+
- name: 5.14.0
42+
pyqt_version: 5.14.0
4243
qt_version: 5.14.0
43-
- pyqt_version: 5.14.1
44+
major: 5
45+
- name: 5.14.1
46+
pyqt_version: 5.14.1
4447
qt_version: 5.14.1
45-
- pyqt_version: 5.14.2
48+
major: 5
49+
- name: 5.14.2
50+
pyqt_version: 5.14.2
4651
qt_version: 5.14.2
47-
- pyqt_version: 5.15.0
52+
major: 5
53+
- name: 5.15.0
54+
pyqt_version: 5.15.0
4855
qt_version: 5.15.0
49-
- pyqt_version: 5.15.1
56+
major: 5
57+
- name: 5.15.1
58+
pyqt_version: 5.15.1
5059
qt_version: 5.15.1
51-
- pyqt_version: 5.15.2
60+
major: 5
61+
- name: 5.15.2
62+
pyqt_version: 5.15.2
5263
qt_version: 5.15.2
53-
- pyqt_version: 5.15.3
64+
major: 5
65+
- name: 5.15.3
66+
pyqt_version: 5.15.3
5467
qt_version: 5.15.2
55-
- pyqt_version: 5.15.4
68+
major: 5
69+
- name: 5.15.4
70+
pyqt_version: 5.15.4
5671
qt_version: 5.15.2
72+
major: 5
73+
# - name: 6.0.0
74+
# pyqt_version: 6.0.0
75+
# qt_version: 6.0.0
76+
# major: 6
77+
- name: 6.0.1
78+
pyqt_version: 6.0.1
79+
qt_version: 6.0.1
80+
major: 6
81+
- name: 6.0.2
82+
pyqt_version: 6.0.2
83+
qt_version: 6.0.2
84+
major: 6
85+
- name: 6.0.3
86+
pyqt_version: 6.0.3
87+
qt_version: 6.0.3
88+
major: 6
89+
# no PyQt6==6.0.4
90+
# - name: 6.0.4
91+
# pyqt_version: 6.0.4
92+
# qt_version: 6.0.4
93+
# major: 6
94+
- name: 6.1.0
95+
pyqt_version: 6.1.0
96+
qt_version: 6.1.0
97+
major: 6
5798
bitness:
5899
- name: x64
59100
action: x64
@@ -83,6 +124,10 @@ jobs:
83124
name: 3.5
84125
qt:
85126
pyqt_version: 5.15.4
127+
- python:
128+
name: 3.5
129+
qt:
130+
major: 6
86131
env:
87132
QT_VERSION: ${{ matrix.qt.qt_version }}
88133
PYQT_VERSION: ${{ matrix.qt.pyqt_version }}
@@ -123,15 +168,15 @@ jobs:
123168
- name: Archive individual wheel
124169
uses: actions/upload-artifact@v1
125170
with:
126-
name: ${{ matrix.qt.pyqt_version }}
171+
name: ${{ matrix.qt.name }}
127172
path: dist/
128173
- name: Archive all wheels
129174
uses: actions/upload-artifact@v1
130175
with:
131176
name: all_wheels
132177
path: dist/
133178
test:
134-
name: Test ${{ matrix.os.name }} ${{ matrix.python.name }}-${{ matrix.bitness.name }} ${{ matrix.qt.pyqt_version }}
179+
name: Test ${{ matrix.os.name }} ${{ matrix.python.name }}-${{ matrix.bitness.name }} ${{ matrix.qt.name }}
135180
runs-on: ${{ matrix.os.runs-on }}
136181
container: ${{ matrix.os.container[matrix.python.docker] }}
137182
needs:
@@ -192,22 +237,77 @@ jobs:
192237
docker: miniconda3
193238
matrix: miniconda3
194239
qt:
195-
- pyqt_version: 5.14.0
240+
- name: 5.14.0
241+
pyqt_version: 5.14.0
196242
qt_version: 5.14.0
197-
- pyqt_version: 5.14.1
243+
major: 5
244+
tox: qt5
245+
- name: 5.14.1
246+
pyqt_version: 5.14.1
198247
qt_version: 5.14.1
199-
- pyqt_version: 5.14.2
248+
major: 5
249+
tox: qt5
250+
- name: 5.14.2
251+
pyqt_version: 5.14.2
200252
qt_version: 5.14.2
201-
- pyqt_version: 5.15.0
253+
major: 5
254+
tox: qt5
255+
- name: 5.15.0
256+
pyqt_version: 5.15.0
202257
qt_version: 5.15.0
203-
- pyqt_version: 5.15.1
258+
major: 5
259+
tox: qt5
260+
- name: 5.15.1
261+
pyqt_version: 5.15.1
204262
qt_version: 5.15.1
205-
- pyqt_version: 5.15.2
263+
major: 5
264+
tox: qt5
265+
- name: 5.15.2
266+
pyqt_version: 5.15.2
206267
qt_version: 5.15.2
207-
- pyqt_version: 5.15.3
268+
major: 5
269+
tox: qt5
270+
- name: 5.15.3
271+
pyqt_version: 5.15.3
208272
qt_version: 5.15.2
209-
- pyqt_version: 5.15.4
273+
major: 5
274+
tox: qt5
275+
- name: 5.15.4
276+
pyqt_version: 5.15.4
210277
qt_version: 5.15.2
278+
major: 5
279+
tox: qt5
280+
# - name: 6.0.0
281+
# pyqt_version: 6.0.0
282+
# qt_version: 6.0.0
283+
# major: 6
284+
# tox: qt6
285+
- name: 6.0.1
286+
pyqt_version: 6.0.1
287+
qt_version: 6.0.1
288+
major: 6
289+
tox: qt6
290+
- name: 6.0.2
291+
pyqt_version: 6.0.2
292+
qt_version: 6.0.2
293+
major: 6
294+
tox: qt6
295+
- name: 6.0.3
296+
pyqt_version: 6.0.3
297+
qt_version: 6.0.3
298+
major: 6
299+
tox: qt6
300+
# no PyQt6==6.0.4
301+
# - name: 6.0.4
302+
# pyqt_version: 6.0.4
303+
# qt_version: 6.0.4
304+
# major: 6
305+
# tox: qt6
306+
- name: 6.1.0
307+
pyqt_version: 6.1.0
308+
qt_version: 6.1.0
309+
major: 6
310+
tox: qt6
211311
bitness:
212312
- name: x32
213313
action: x86
@@ -264,6 +364,16 @@ jobs:
264364
name: macOS
265365
qt:
266366
pyqt_version: 5.14.1
367+
- python:
368+
name: 3.5
369+
qt:
370+
major: 6
371+
- bitness:
372+
name: x32
373+
os:
374+
name: Windows
375+
qt:
376+
major: 6
267377
env:
268378
QT_VERSION: ${{ matrix.qt.qt_version }}
269379
PYQT_VERSION: ${{ matrix.qt.pyqt_version }}
@@ -275,7 +385,7 @@ jobs:
275385
- name: Download
276386
uses: actions/download-artifact@v1
277387
with:
278-
name: ${{ matrix.qt.pyqt_version }}
388+
name: ${{ matrix.qt.name }}
279389
path: dist/
280390
- name: Set up Python ${{ matrix.python.name }}-${{ matrix.bitness.name }}
281391
if: matrix.os.matrix != 'linux'
@@ -323,7 +433,7 @@ jobs:
323433
arch: ${{ matrix.bitness.ilammy }}
324434
- name: Test
325435
run: |
326-
tox -e ${{ matrix.python.tox }} --installpkg ${{ env['WHEEL_PATH'] }}
436+
tox -e ${{ matrix.python.tox }}-${{ matrix.qt.tox }} --installpkg ${{ env['WHEEL_PATH'] }}
327437
maybe_publish:
328438
name: Maybe Publish
329439
runs-on: ubuntu-latest

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
recursive-include src/pyqt5_tools *
1+
recursive-include src/pyqt_tools *

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versioneer]
22
VCS = git
33
style = pep440-post
4-
versionfile_source = src/pyqt5_tools/_version.py
5-
versionfile_build = pyqt5_tools/_version.py
4+
versionfile_source = src/pyqt_tools/_version.py
5+
versionfile_build = pyqt_tools/_version.py
66
tag_prefix = v

setup.py

+16-12
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ def pad_version(v, segment_count=3):
1919

2020
# TODO: really doesn't seem quite proper here and probably should come
2121
# in some other way?
22-
pyqt_version = pad_version(os.environ.setdefault('PYQT_VERSION', '5.15.4'))
23-
qt_version = pad_version(os.environ.setdefault('QT_VERSION', '5.15.2'))
22+
pyqt_version = pad_version(os.environ.setdefault('PYQT_VERSION', '6.1.0'))
23+
qt_version = pad_version(os.environ.setdefault('QT_VERSION', '6.1.0'))
2424
pyqt_major_version = pyqt_version.partition('.')[0]
2525

2626

27-
pyqt5_tools_wrapper_version = versioneer.get_versions()['version']
28-
pyqt5_tools_version = '{}.{}'.format(pyqt_version, pyqt5_tools_wrapper_version)
27+
pyqt_tools_wrapper_version = versioneer.get_versions()['version']
28+
pyqt_tools_version = '{}.{}'.format(pyqt_version, pyqt_tools_wrapper_version)
2929

3030

3131
# Inclusive of the lower bound and exclusive of the upper
32-
pyqt_plugins_wrapper_range = ['2', '3']
32+
pyqt_plugins_wrapper_range = ['2.2', '3']
3333

3434
# Must be False for release. PyPI won't let you upload with a URL dependency.
3535
use_pyqt_plugins_url = False
@@ -50,12 +50,16 @@ def pad_version(v, segment_count=3):
5050
readme = f.read()
5151

5252

53+
distribution_name = "pyqt{}-tools".format(pyqt_major_version)
54+
import_name = distribution_name.replace('-', '_')
55+
56+
5357
setuptools.setup(
54-
name="pyqt5_tools",
58+
name=distribution_name,
5559
description="PyQt Designer and QML plugins",
5660
long_description=readme,
5761
long_description_content_type='text/x-rst',
58-
url='https://github.com/altendky/pyqt5-tools',
62+
url='https://github.com/altendky/pyqt-tools',
5963
author="Kyle Altendorf",
6064
author_email='[email protected]',
6165
license='GPLv3',
@@ -76,14 +80,14 @@ def pad_version(v, segment_count=3):
7680
'Topic :: Software Development',
7781
'Topic :: Utilities',
7882
],
79-
packages=setuptools.find_packages('src'),
80-
package_dir={'': 'src'},
81-
version=pyqt5_tools_version,
83+
packages=[package.replace('pyqt_tools', import_name) for package in setuptools.find_packages('src')],
84+
package_dir={import_name: 'src/pyqt_tools'},
85+
version=pyqt_tools_version,
8286
include_package_data=True,
8387
python_requires=">=3.5",
8488
install_requires=[
8589
'click',
86-
'pyqt5=={}'.format(pyqt_version),
90+
'pyqt{}=={}'.format(pyqt_major_version, pyqt_version),
8791
'pyqt{}-plugins{}{}'.format(
8892
pyqt_major_version,
8993
pyqt_plugins_version_specifier,
@@ -93,7 +97,7 @@ def pad_version(v, segment_count=3):
9397
],
9498
entry_points={
9599
'console_scripts': [
96-
'pyqt{}-tools = pyqt5_tools.entrypoints:main'.format(pyqt_major_version),
100+
'pyqt{major}-tools = pyqt{major}_tools.entrypoints:main'.format(major=pyqt_major_version),
97101
]
98102
}
99103
)

src/pyqt5_tools/__init__.py

-3
This file was deleted.

0 commit comments

Comments
 (0)