File tree 1 file changed +12
-8
lines changed 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -256,16 +256,20 @@ def setup(**kwargs):
256
256
f .write (tomli_w .dumps (project_data ))
257
257
258
258
259
- def find_packages ( * args , ** kwargs ) :
260
- del sys .modules [ 'setuptools' ]
261
- current_directory = sys .path .pop (0 )
259
+ if __name__ == 'setuptools' :
260
+ __this_shim = sys .modules . pop ( 'setuptools' )
261
+ __current_directory = sys .path .pop (0 )
262
262
263
- try :
264
- import setuptools
263
+ import setuptools as __real_setuptools
265
264
266
- return setuptools .find_packages (* args , ** kwargs )
267
- finally :
268
- sys .path .insert (0 , current_directory )
265
+ sys .path .insert (0 , __current_directory )
266
+ sys .modules ['setuptools' ] = __this_shim
267
+
268
+ def __getattr__ (name ):
269
+ return getattr (__real_setuptools , name )
270
+
271
+ del __this_shim
272
+ del __current_directory
269
273
270
274
271
275
def migrate (root , setuptools_options ):
You can’t perform that action at this time.
0 commit comments