We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 68ed63b + 41f5378 commit 5b9a83cCopy full SHA for 5b9a83c
1 file changed
setup_cptrace.py
@@ -1,5 +1,7 @@
1
#!/usr/bin/env python
2
3
+import importlib.util
4
+
5
SOURCES = ['cptrace/cptrace.c']
6
7
CLASSIFIERS = [
@@ -17,7 +19,6 @@
17
19
18
20
21
def main():
- from imp import load_source
22
from os import path
23
from sys import argv
24
@@ -29,7 +30,10 @@ def main():
29
30
31
cptrace_ext = Extension('cptrace', sources=SOURCES)
32
- cptrace = load_source("version", path.join("cptrace", "version.py"))
33
+ cptrace_spec = importlib.util.spec_from_file_location("version",
34
+ path.join("cptrace", "version.py"))
35
+ cptrace = importlib.util.module_from_spec(cptrace_spec)
36
+ cptrace_spec.loader.exec_module(cptrace)
37
38
install_options = {
39
"name": cptrace.PACKAGE,
0 commit comments