Skip to content

Commit 01f068f

Browse files
authored
Merge pull request #63 from BitBloomTech/feature/remove-pyqt5-requirement
Remove pyqt5 requirement
2 parents 749385f + c01a30f commit 01f068f

File tree

7 files changed

+56
-21
lines changed

7 files changed

+56
-21
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
python3 -m venv .venv
4141
. .venv/bin/activate
4242
pip install --upgrade pip
43-
pip install .[test,publish]
43+
pip install .[ui,test,publish]
4444
4545
# run tests!
4646
- run:

pyqttoolkit/data/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
from .interval import calculate_interval
1919
from .bits import get_next_available_bit
2020
from .names import get_next_available_name
21+
from .message import MessageType, MessageResponse

pyqttoolkit/data/message.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# pyqttoolkit
2+
# Copyright (C) 2018-2019, Simmovation Ltd.
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program; if not, write to the Free Software Foundation,
16+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+
from enum import Enum, IntEnum
18+
19+
class MessageType(Enum):
20+
validation_error = 0
21+
confirmation = 1
22+
application_exception = 2
23+
24+
class MessageResponse(IntEnum):
25+
ok = 1
26+
cancel = 2
27+
save = 4
28+
discard = 8
29+
ignore = 16

pyqttoolkit/exceptions/__init__.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# pyqttoolkit
2+
# Copyright (C) 2018-2019, Simmovation Ltd.
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program; if not, write to the Free Software Foundation,
16+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+
class TaskCancelled(Exception):
18+
pass

pyqttoolkit/services/message_board.py

+1-13
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,13 @@
1414
# You should have received a copy of the GNU General Public License
1515
# along with this program; if not, write to the Free Software Foundation,
1616
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17-
from enum import Enum, IntEnum
1817

1918
#pylint: disable=no-name-in-module
2019
from PyQt5.QtCore import QObject, pyqtSignal, Qt
2120
#pylint: enable=no-name-in-module
2221

2322
from ..properties import AutoProperty
24-
25-
class MessageType(Enum):
26-
validation_error = 0
27-
confirmation = 1
28-
application_exception = 2
29-
30-
class MessageResponse(IntEnum):
31-
ok = 1
32-
cancel = 2
33-
save = 4
34-
discard = 8
35-
ignore = 16
23+
from ..data import MessageType, MessageResponse
3624

3725
class MessageArgs:
3826
def __init__(self, message_type, message, checkbox_message, response_type, text_format):

pyqttoolkit/services/task_runner.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from concurrent.futures import ThreadPoolExecutor
2727

2828
from ..properties import AutoProperty
29+
from ..exceptions import TaskCancelled
2930

3031
LOGGER = logging.getLogger(__name__)
3132

@@ -71,8 +72,6 @@ def cancel(self):
7172
if self._cancellable:
7273
self.cancelled.emit()
7374

74-
class TaskCancelled(Exception):
75-
pass
7675

7776
class Worker:
7877
def __init__(self, task_runner, f, args, busy_args, on_completed, on_cancelled, on_error, error_description):

setup.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
README_CONTENTS = fp.read()
1212

1313
install_requires = [
14-
'pyQt5',
1514
'matplotlib',
1615
'jinja2',
1716
'pandas',
@@ -30,7 +29,8 @@
3029

3130
extras_require = {
3231
'test': tests_require,
33-
'publish': ['twine']
32+
'publish': ['twine'],
33+
'ui': ['pyqt5']
3434
}
3535

3636
setup(
@@ -42,9 +42,9 @@
4242
cmdclass=versioneer.get_cmdclass(),
4343
license='GPLv3',
4444
version=versioneer.get_version(),
45-
author='Simmovation Ltd',
46-
author_email='info@simmovation.tech',
47-
url='https://github.com/Simmovation/pyqttoolkit',
45+
author='Bitbloom Ltd',
46+
author_email='info@bitbloom.tech',
47+
url='https://github.com/BitBloomTech/pyqttoolkit',
4848
platforms='any',
4949
description='A toolkit for PyQt 5',
5050
long_description=README_CONTENTS,

0 commit comments

Comments
 (0)