def _copy_dist_from_dir(link_path, location):
 if os.path.isdir(location):
  rmtree(location)
 setup_py = 'setup.py'
 sdist_args = [sys.executable]
 sdist_args.append('-c')
 sdist_args.append((SETUPTOOLS_SHIM % setup_py))
 sdist_args.append('sdist')
 sdist_args += ['--dist-dir', location]
 logger.info('Running setup.py sdist for %s', link_path)
 with indent_log():
  call_subprocess(sdist_args, cwd=link_path, show_stdout=False)
 sdist = os.path.join(location, os.listdir(location)[0])
 logger.info('Unpacking sdist %s into %s', sdist, location)
 unpack_file(sdist, location, content_type=None, link=None)

def _copy_dist_from_dir ( link_path , location ) : if os . path . isdir ( location ) : rmtree ( location ) setup_py = 'setup.py' sdist_args = [ sys . executable ] sdist_args . append ( '-c' ) sdist_args . append ( ( SETUPTOOLS_SHIM % setup_py ) ) sdist_args . append ( 'sdist' ) sdist_args += [ '--dist-dir' , location ] logger . info ( 'Running setup.py sdist for %s' , link_path ) with indent_log ( ) : call_subprocess ( sdist_args , cwd = link_path , show_stdout = False ) sdist = os . path . join ( location , os . listdir ( location ) [ 0 ] ) logger . info ( 'Unpacking sdist %s into %s' , sdist , location ) unpack_file ( sdist , location , content_type = None , link = None )
copy distribution files in link_path to location .