Skip to content

Commit d6db72f

Browse files
Merge pull request #124 from x-tabdeveloping/setuptools-fix
Setuptools fix
2 parents 34c7601 + f6f6903 commit d6db72f

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ profile = "black"
99

1010
[project]
1111
name = "turftopic"
12-
version = "0.23.2"
12+
version = "0.23.3"
1313
description = "Topic modeling with contextual representations from sentence transformers."
1414
authors = [
1515
{ name = "Márton Kardos <power.up1163@gmail.com>", email = "martonkardos@cas.au.dk" }

turftopic/serialization.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import json
22
import warnings
3+
from importlib.metadata import version
34
from pathlib import Path
45
from typing import Union
56

67
import joblib
7-
import pkg_resources
88
from huggingface_hub import snapshot_download
99

1010
IMPORTANT_PACKAGES = [
@@ -61,10 +61,7 @@
6161

6262

6363
def get_package_versions() -> dict[str, str]:
64-
return {
65-
package: pkg_resources.get_distribution(package).version
66-
for package in IMPORTANT_PACKAGES
67-
}
64+
return {package: version(package) for package in IMPORTANT_PACKAGES}
6865

6966

7067
def validate_package_versions(remote_versions: dict[str, str]):

0 commit comments

Comments
 (0)