Skip to content

Commit edf5a3b

Browse files
committed
ipfx/x_to_nwb/conversion_utils.py: Avoid using the pkg_resources module
This is removed in python 3.12. And we can also directly use __version__.
1 parent 7e7a71a commit edf5a3b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ipfx/x_to_nwb/conversion_utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"""
55

66
import math
7-
from pkg_resources import get_distribution, DistributionNotFound
87
import os
98
from subprocess import Popen, PIPE
109

@@ -143,10 +142,7 @@ def get_git_version():
143142

144143
return f"({branch}) {rev}"
145144

146-
try:
147-
package_version = get_distribution('ipfx').version
148-
except DistributionNotFound: # not installed as a package
149-
package_version = None
145+
package_version = __version__
150146

151147
try:
152148
git_version = get_git_version()

0 commit comments

Comments
 (0)