File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change
1
+ import functools
1
2
import sys
2
3
import subprocess
3
4
4
- from jaraco .packaging import metadata
5
+ import jaraco .packaging . metadata
5
6
from path import Path
6
7
7
8
@@ -41,11 +42,20 @@ def update_pkg_resources():
41
42
install_deps (deps , vendor )
42
43
43
44
45
+ @functools .cache
46
+ def metadata ():
47
+ return jaraco .packaging .metadata .load ('.' )
48
+
49
+
44
50
def load_deps ():
45
51
"""
46
52
Read the dependencies from `.`.
47
53
"""
48
- return metadata .load ('.' ).get_all ('Requires-Dist' )
54
+ return metadata ().get_all ('Requires-Dist' )
55
+
56
+
57
+ def min_python ():
58
+ return metadata ()['Requires-Python' ].removeprefix ('>=' ).strip ()
49
59
50
60
51
61
def install_deps (deps , vendor ):
@@ -65,7 +75,7 @@ def install_deps(deps, vendor):
65
75
'--target' ,
66
76
str (vendor ),
67
77
'--python-version' ,
68
- '3.8' ,
78
+ min_python () ,
69
79
'--only-binary' ,
70
80
':all:' ,
71
81
] + list (deps )
You can’t perform that action at this time.
0 commit comments