Skip to content

Commit e42ea15

Browse files
committed
MAINT: bump actions
1 parent 097fd08 commit e42ea15

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[project]
2-
requires-python = ">=3.7"
2+
requires-python = ">=3.9"
33
name = "refellips"
44
dynamic=["version", "description", "readme", "license", "classifiers", "urls", "authors"]

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ def get_version_info():
8080
GIT_REVISION = git_version()
8181
elif os.path.exists("refellips/version.py"):
8282
# must be a source distribution, use existing version file
83-
# load it as a separate module to not load refellips/__init__.py
84-
import imp
85-
86-
version = imp.load_source("refellips.version", "refellips/version.py")
87-
GIT_REVISION = version.git_revision
83+
# load it as a separate module to not load refnx/__init__.py
84+
import importlib.util
85+
spec = importlib.util.spec_from_file_location("version", "refnx/version.py")
86+
module = importlib.util.module_from_spec(spec)
87+
spec.loader.exec_module(module)
88+
GIT_REVISION = module.git_revision
8889
else:
8990
GIT_REVISION = "Unknown"
9091

0 commit comments

Comments
 (0)