@@ -77,6 +77,10 @@ def setuptools_sdist(tmp_path_factory, request):
77
77
if dist :
78
78
return dist
79
79
80
+ # Sanity check
81
+ # Building should not create recursive `setuptools/build/lib/build/lib/...`
82
+ assert not Path (request .config .rootdir , "build/lib/build" ).exists ()
83
+
80
84
subprocess .check_output ([
81
85
sys .executable ,
82
86
"-m" ,
@@ -86,6 +90,11 @@ def setuptools_sdist(tmp_path_factory, request):
86
90
str (tmp ),
87
91
str (request .config .rootdir ),
88
92
])
93
+
94
+ # Sanity check
95
+ # Building should not create recursive `setuptools/build/lib/build/lib/...`
96
+ assert not Path (request .config .rootdir , "build/lib/build" ).exists ()
97
+
89
98
return next (tmp .glob ("*.tar.gz" ))
90
99
91
100
@@ -102,6 +111,10 @@ def setuptools_wheel(tmp_path_factory, request):
102
111
if dist :
103
112
return dist
104
113
114
+ # Sanity check
115
+ # Building should not create recursive `setuptools/build/lib/build/lib/...`
116
+ assert not Path (request .config .rootdir , "build/lib/build" ).exists ()
117
+
105
118
subprocess .check_output ([
106
119
sys .executable ,
107
120
"-m" ,
@@ -111,6 +124,11 @@ def setuptools_wheel(tmp_path_factory, request):
111
124
str (tmp ),
112
125
str (request .config .rootdir ),
113
126
])
127
+
128
+ # Sanity check
129
+ # Building should not create recursive `setuptools/build/lib/build/lib/...`
130
+ assert not Path (request .config .rootdir , "build/lib/build" ).exists ()
131
+
114
132
return next (tmp .glob ("*.whl" ))
115
133
116
134
0 commit comments