Skip to content

Commit

Permalink
Minor change to substitute imp with importlib, trying to support 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Caisusandy committed Jun 12, 2024
1 parent 9e4271b commit e67b7c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: ["3.9","3.10","3.11"]
python-version: ["3.9","3.10","3.11", "3.12"]
os:
- macOS-latest
- ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ nosetests.xml
.project
.pydevproject
.idea/
.vscode/

# Autogenerated during setup.py
msmbuilder/src/config.pxi
Expand Down
5 changes: 3 additions & 2 deletions basesetup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from __future__ import print_function, absolute_import
import os
import sys
import imp
import importlib.util
import json
import string
import shutil
import subprocess
import tempfile

from distutils.dep_util import newer_group
from distutils.core import Extension
from distutils.errors import DistutilsExecError
Expand All @@ -33,7 +34,7 @@ def find_packages():
def check_dependencies(dependencies):
def module_exists(dep):
try:
imp.find_module(dep)
importlib.util.find_spec(dep)
return True
except ImportError:
return False
Expand Down

0 comments on commit e67b7c4

Please sign in to comment.