Skip to content

Commit

Permalink
pkg_resources is removed in python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dkratzert committed Apr 5, 2024
1 parent 10af584 commit 56c4b97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ macholib
numpy<2.0
pefile
PyQt5~=5.15
PyQt5-sip~=12.12
PyQt5-sip~=12.13
PyQt5-stubs~=5.15
pywin32-ctypes~=0.2
six
requests
gemmi
gemmi~=0.6
gunicorn
xlsxwriter
qtawesome
6 changes: 3 additions & 3 deletions src/structurefinder/ccdc/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tempfile import mkstemp
from typing import Union

from pkg_resources import parse_version
from packaging.version import Version

DEBUG = False

Expand Down Expand Up @@ -45,11 +45,11 @@ def get_cccsd_path() -> Union[Path, None]:
return None
num = QueryInfoKey(csd)[0] # returns the number of subkeys
csd_path = None
latest = parse_version('0.0')
latest = Version('0.0')
for n in range(num):
vernum_dir = EnumKey(csd, n) # subkey of version
path = OpenKey(HKEY_CURRENT_USER, software + vernum_dir)
ver = parse_version(vernum_dir)
ver = Version(vernum_dir)
if QueryInfoKey(path)[1] > 0: # subkey with content
if latest < ver:
csd_path = Path(EnumValue(path, 0)[1], 'ccdc_searcher.bat')
Expand Down

0 comments on commit 56c4b97

Please sign in to comment.