#NEWLINE# def test_home_installation_scheme( self ) : #NEWLINE# #INDENT# builddir = self . mkdtemp ( ) #NEWLINE# destination = os . path . join ( self , 'installation' ) #NEWLINE# dist = Distribution ( { #NEWLINE# #INDENT# 'name' : 'foopkg' , #NEWLINE# #UNINDENT# } ) #NEWLINE# dist . script_name = os . path . join ( builddir , 'setup.py' ) #NEWLINE# dist . command_obj [ 'build' ] = support . DummyCommand ( build_base = builddir , build_lib = os . path . join ( builddir , 'lib' ) ) #NEWLINE# cmd = install ( dist ) #NEWLINE# cmd . home = destination #NEWLINE# cmd . ensure_finalized ( ) #NEWLINE# self . assertEqual ( cmd . install_base , destination ) #NEWLINE# self . assertEqual ( cmd . install_platbase , destination ) #NEWLINE# def check_path( got , expected ) : #NEWLINE# #INDENT# got = os . path . normpath ( got ) #NEWLINE# expected = os . path . normpath ( expected ) #NEWLINE# self . assertEqual ( got , expected ) #NEWLINE# #UNINDENT# libdir = os . path . join ( destination , 'lib' , 'python' ) #NEWLINE# check_path ( cmd . install_lib , libdir ) #NEWLINE# check_path ( cmd . install_platlib , libdir ) #NEWLINE# check_path ( cmd . install_purelib , libdir ) #NEWLINE# check_path ( cmd . install_headers , os . path . join ( destination , 'include' , 'python' , 'foopkg' ) ) #NEWLINE# check_path ( cmd . install_scripts , os . path . join ( destination , 'bin' ) ) #NEWLINE# check_path ( cmd . install_data , destination )