<s> from conans . test . utils . cpp_test_files import cpp_hello_source_files , cpp_hello_conan_files <EOL> from conans . test . utils . go_test_files import go_hello_source_files , go_hello_conan_files <EOL> import os <EOL> from conans . paths import PACKAGE_TGZ_NAME <EOL> import tempfile <EOL> from conans . test import CONAN_TEST_FOLDER <EOL> from conans . tools import untargz <EOL> from conans . errors import ConanException <EOL> def temp_folder ( ) : <EOL> t = tempfile . mkdtemp ( suffix = '<STR_LIT>' , dir = CONAN_TEST_FOLDER ) <EOL> nt = os . path . join ( t , "<STR_LIT>" ) <EOL> os . makedirs ( nt ) <EOL> return nt <EOL> def uncompress_packaged_files ( paths , package_reference ) : <EOL> package_path = paths . package ( package_reference ) <EOL> if not ( os . path . exists ( os . path . join ( package_path , PACKAGE_TGZ_NAME ) ) ) : <EOL> raise ConanException ( "<STR_LIT>" % ( PACKAGE_TGZ_NAME , package_path ) ) <EOL> tmp = temp_folder ( ) <EOL> untargz ( os . path . join ( package_path , PACKAGE_TGZ_NAME ) , tmp ) <EOL> return tmp <EOL> def scan_folder ( folder ) : <EOL> scanned_files = [ ] <EOL> for root , _ , files in os . walk ( folder ) : <EOL> relative_path = os . path . relpath ( root , folder ) <EOL> for f in files : <EOL> relative_name = os . path . normpath ( os . path . join ( relative_path , f ) ) . replace ( "<STR_LIT:\\>" , "<STR_LIT:/>" ) <EOL> scanned_files . append ( relative_name ) <EOL> return sorted ( scanned_files ) <EOL> def hello_source_files ( number = <NUM_LIT:0> , deps = None , lang = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> if lang == '<STR_LIT>' : <EOL> return cpp_hello_source_files ( number , deps ) <EOL> elif lang == '<STR_LIT>' : <EOL> return go_hello_source_files ( number , deps ) <EOL> def hello_conan_files ( conan_reference , number = <NUM_LIT:0> , deps = None , language = <NUM_LIT:0> , lang = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> if lang == '<STR_LIT>' : <EOL> return cpp_hello_conan_files ( conan_reference , number , deps , language ) <EOL> elif lang == '<STR_LIT>' : <EOL> return go_hello_conan_files ( conan_reference , number , deps ) </s>
