Skip to content

Commit

Permalink
remove reference to pkg_resource which is deprecated in python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
fsck-block committed Oct 3, 2024
1 parent 677876a commit ac88109
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scripts/auto_firmware_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
#
# Copyright (C) 2022 Thomas Basler and others
#
import pkg_resources

Import("env")

required_pkgs = {'dulwich'}
installed_pkgs = {pkg.key for pkg in pkg_resources.working_set}
missing_pkgs = required_pkgs - installed_pkgs

if missing_pkgs:
try:
from dulwich import porcelain
except ModuleNotFoundError:
env.Execute('"$PYTHONEXE" -m pip install dulwich')
from dulwich import porcelain

from dulwich import porcelain

Expand Down

0 comments on commit ac88109

Please sign in to comment.