Skip to content

Commit 481006b

Browse files
authored
Merge pull request #2651 from sebix/fix-2649
pkg: replace distutils by packaging
2 parents 39ec9fc + 7fb2cc3 commit 481006b

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/debian-package.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Github Workflow to build Debian packages for intelmq-api
22
#
3-
#SPDX-FileCopyrightText: 2020 IntelMQ Team <[email protected]>
3+
#SPDX-FileCopyrightText: 2020 IntelMQ Team <[email protected]>, 2025 Institute for Common Good Technology
44
#SPDX-License-Identifier: AGPL-3.0-or-later
55
#
66
name: "Build Debian packages"
@@ -16,7 +16,7 @@ on:
1616

1717
jobs:
1818
build:
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-24.04
2020
env:
2121
# Fixes https://github.com/actions/virtual-environments/issues/3080
2222
STORAGE_OPTS: overlay.mount_program=/usr/bin/fuse-overlayfs
@@ -32,6 +32,9 @@ jobs:
3232
- name: Build package
3333
run: bash .github/workflows/scripts/debian-package.sh ${{ matrix.codename }}
3434

35+
- name: Test packages installation
36+
run: sudo apt install ~/artifacts/*.deb
37+
3538
- name: Upload artifact
3639
if: ${{ github.event_name == 'push' }}
3740
uses: actions/upload-artifact@v4

debian/control

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 4.1.16),
99
python3-cerberus,
1010
python3-dateutil (>= 2.5),
1111
python3-dnspython (>= 2.0.0),
12+
python3-packaging,
1213
python3-psutil (>= 1.2.1),
1314
python3-redis (>= 2.10),
1415
python3-requests (>= 2.2.0),
@@ -61,6 +62,7 @@ Architecture: all
6162
Depends: python3-dateutil (>= 2.5),
6263
python3-dnspython (>= 2.0.0),
6364
python3-openssl,
65+
python3-packaging,
6466
python3-psutil (>= 1.2.1),
6567
python3-redis (>= 2.10),
6668
python3-requests (>= 2.2.0),

intelmq/lib/processmanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# SPDX-License-Identifier: AGPL-3.0-or-later
44
import abc
5-
import distutils.version
65
import getpass
76
import http.client
87
import inspect
@@ -17,6 +16,7 @@
1716
import xmlrpc.client
1817
from typing import Union
1918
from collections.abc import Iterable
19+
from packaging.version import Version
2020

2121

2222
from intelmq import (DEFAULT_LOGGING_LEVEL, # noqa: F401
@@ -586,7 +586,7 @@ def make_connection(self, host):
586586
self.__supervisor_xmlrpc.supervisor.getAPIVersion()
587587
))
588588

589-
if distutils.version.StrictVersion(supervisor_version) < distutils.version.StrictVersion("3.2.0"):
589+
if Version(supervisor_version) < Version("3.2.0"):
590590
self.__logger.warning("Current supervisor version is supported, but reloading bots will not work. "
591591
"Please upgrade supervisor to version 3.2.0 or higher.")
592592

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
'redis>=2.10',
1818
'requests>=2.2.0',
1919
'ruamel.yaml',
20+
'packaging',
2021
]
2122

2223
TESTS_REQUIRES = [

0 commit comments

Comments
 (0)