File tree 2 files changed +18
-12
lines changed
2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change
1
+ Start wheel build from an empty directory, to avoid accidentally importing
2
+ python files from the addon root directory during the build process.
Original file line number Diff line number Diff line change @@ -45,18 +45,22 @@ def __init__(self):
45
45
)
46
46
47
47
def build_wheel (self , project_dir : Path , dist_dir : str ) -> None :
48
- check_call (
49
- [
50
- self .env_python ,
51
- "-m" ,
52
- "build" ,
53
- "--wheel" ,
54
- "--outdir" ,
55
- dist_dir ,
56
- "--no-isolation" ,
57
- ],
58
- cwd = project_dir ,
59
- )
48
+ with tempfile .TemporaryDirectory () as empty_dir :
49
+ # Start build from an empty directory, to avoid accidentally importing
50
+ # python files from the addon root directory during the build process.
51
+ check_call (
52
+ [
53
+ self .env_python ,
54
+ "-m" ,
55
+ "build" ,
56
+ "--wheel" ,
57
+ "--outdir" ,
58
+ dist_dir ,
59
+ "--no-isolation" ,
60
+ project_dir ,
61
+ ],
62
+ cwd = empty_dir ,
63
+ )
60
64
self ._check_wheels (dist_dir )
61
65
return True
62
66
You can’t perform that action at this time.
0 commit comments