@@ -80,32 +80,38 @@ def process_f(file):
8080 return
8181
8282
83- def deploy_stdlib_fpm ():
83+ def deploy_stdlib_fpm (with_ilp64 ):
8484 """create the stdlib-fpm folder for backwards compatibility (to be deprecated)
8585 """
8686 import shutil
8787 prune = (
8888 "test_hash_functions.f90" ,
8989 "f18estop.f90" ,
9090 )
91- if not os .path .exists ('stdlib-fpm' + os .sep + 'src' ):
92- os .makedirs ('stdlib-fpm' + os .sep + 'src' )
93- if not os .path .exists ('stdlib-fpm' + os .sep + 'test' ):
94- os .makedirs ('stdlib-fpm' + os .sep + 'test' )
95- if not os .path .exists ('stdlib-fpm' + os .sep + 'example' ):
96- os .makedirs ('stdlib-fpm' + os .sep + 'example' )
91+
92+ if with_ilp64 :
93+ base_folder = 'stdlib-fpm-ilp64'
94+ else
95+ base_folder = 'stdlib-fpm'
96+
97+ if not os .path .exists (base_folder + os .sep + 'src' ):
98+ os .makedirs (base_folder + os .sep + 'src' )
99+ if not os .path .exists (base_folder + os .sep + 'test' ):
100+ os .makedirs (base_folder + os .sep + 'test' )
101+ if not os .path .exists (base_folder + os .sep + 'example' ):
102+ os .makedirs (base_folder + os .sep + 'example' )
97103
98104 def recursive_copy (folder ):
99105 for root , _ , files in os .walk (folder ):
100106 for file in files :
101107 if file not in prune :
102108 if file .endswith (".f90" ) or file .endswith (".F90" ) or file .endswith (".dat" ) or file .endswith (".npy" ):
103- shutil .copy2 (os .path .join (root , file ), 'stdlib-fpm' + os .sep + folder + os .sep + file )
109+ shutil .copy2 (os .path .join (root , file ), base_folder + os .sep + folder + os .sep + file )
104110 recursive_copy ('src' )
105111 recursive_copy ('test' )
106112 recursive_copy ('example' )
107113 for file in ['.gitignore' ,'fpm.toml' ,'LICENSE' ,'VERSION' ]:
108- shutil .copy2 (file , 'stdlib-fpm' + os .sep + file )
114+ shutil .copy2 (file , base_folder + os .sep + file )
109115 return
110116
111117def fpm_build (args ,unknown ):
@@ -161,7 +167,7 @@ def fpm_build(args,unknown):
161167 # pre process the meta programming fypp files
162168 pre_process_fypp (args )
163169 if args .deploy_stdlib_fpm :
164- deploy_stdlib_fpm ()
170+ deploy_stdlib_fpm (args . with_ilp64 )
165171 #==========================================
166172 # build using fpm
167173 if args .build :
0 commit comments