Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ktool = "ktool.ktool_script:main"
[tool.poetry.dependencies]
python = "^3.6.2"
Pygments = "^2.11.2"
packaging = ">=21.3"
windows-curses = {version = "^2.3.1", platform = "win32"}

[tool.poetry.dev-dependencies]
Expand Down
7 changes: 1 addition & 6 deletions src/ktool/ktool_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@
from enum import Enum
from typing import Union

try:
# noinspection PyProtectedMember
from pkg_resources import packaging
except ImportError:
# noinspection PyProtectedMember
from pkg_resources._vendor import packaging
import packaging

import ktool
from ktool_macho import LOAD_COMMAND
Expand Down
6 changes: 3 additions & 3 deletions src/ktool/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ktool_macho import Struct, FAT_CIGAM, FAT_MAGIC, MH_CIGAM, MH_CIGAM_64, MH_MAGIC, MH_MAGIC_64
from ktool.exceptions import *

import pkg_resources
import importlib.metadata

import lib0cyn.log as log

Expand All @@ -39,8 +39,8 @@
JsonLexer = None

try:
KTOOL_VERSION = pkg_resources.get_distribution('k2l').version
except pkg_resources.DistributionNotFound:
KTOOL_VERSION = importlib.metadata.version('k2l')
except importlib.metadata.PackageNotFoundError:
KTOOL_VERSION = '1.0.0'
THREAD_COUNT = os.cpu_count() - 1

Expand Down