Skip to content

Commit 5514ff0

Browse files
committed
Dependencies: Install a few packages on Python >= 3.7 only
1 parent c42c372 commit 5514ff0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

mqttwarn/services/amqp.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
__copyright__ = 'Copyright 2014 Jan-Piet Mens'
66
__license__ = 'Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)'
77

8-
import puka
8+
import pytest
9+
10+
puka = pytest.importorskip("puka")
911

1012

1113
def plugin(srv, item):

setup.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
extras = {
2727
"amqp": [
28-
"puka>=0.0.7",
28+
"puka>=0.0.7; python_version<'3.12'",
2929
],
3030
"apns": [
3131
"apns>=2.0.1",
@@ -40,7 +40,7 @@
4040
"celery",
4141
],
4242
"chromecast": [
43-
"pychromecast>=7.5.0",
43+
"pychromecast>=7.5.0; python_version>='3.7'",
4444
],
4545
"dnsupdate": [
4646
"dnspython>=1.15.0",
@@ -49,7 +49,7 @@
4949
"fbchat>=1.3.6",
5050
],
5151
"gss2": [
52-
"google-api-python-client<2",
52+
"google-api-python-client<2; python_version>='3.7'",
5353
"gspread>=2.1.1",
5454
"oauth2client>=4.1.2",
5555
],
@@ -91,7 +91,7 @@
9191
"slack-sdk>=3.1.0",
9292
],
9393
"ssh": [
94-
"paramiko>=2.4.1",
94+
"paramiko>=2.4.1; python_version>='3.7'",
9595
],
9696
"tootpaste": [
9797
"Mastodon.py>=1.2.2",
@@ -162,7 +162,7 @@
162162
"pytest-mock<4",
163163
"pytest-mqtt<1",
164164
"tox<4",
165-
'dataclasses; python_version<"3.7"',
165+
"dataclasses; python_version<'3.7'",
166166
"requests-toolbelt>=1,<2",
167167
"responses>=0.13.3,<1",
168168
"pyfakefs>=4.5,<6",
@@ -175,7 +175,7 @@
175175
"build<1",
176176
"mypy<1.3",
177177
"poethepoet<1",
178-
'ruff==0.0.254; python_version>="3.7"',
178+
"ruff==0.0.254; python_version>='3.7'",
179179
"sphinx-autobuild",
180180
]
181181

0 commit comments

Comments
 (0)