From 9abb83c8ed8ce487df63c590a626085d9fae03b0 Mon Sep 17 00:00:00 2001 From: Gerardo Esteban Malazdrewicz Date: Tue, 12 Mar 2024 17:54:25 -0300 Subject: [PATCH] setup.py: Rely on importlib.resources traversable API. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8eb3f38..29498a3 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ import os import os.path -from pkg_resources import resource_filename +from importlib import resources import shutil data_files = [ @@ -78,7 +78,7 @@ ) # Copy the udev rules file -udev_file = resource_filename("alienfx", "data/etc/udev/rules.d/10-alienfx.rules") +udev_file = resources.files("alienfx").joinpath("data/etc/udev/rules.d/10-alienfx.rules").open('rb') udev_rules_dir = "/etc/udev/rules.d/" try: if not os.path.exists(udev_rules_dir):