@@ -80,32 +80,38 @@ def process_f(file):
80
80
return
81
81
82
82
83
- def deploy_stdlib_fpm ():
83
+ def deploy_stdlib_fpm (with_ilp64 ):
84
84
"""create the stdlib-fpm folder for backwards compatibility (to be deprecated)
85
85
"""
86
86
import shutil
87
87
prune = (
88
88
"test_hash_functions.f90" ,
89
89
"f18estop.f90" ,
90
90
)
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' )
97
103
98
104
def recursive_copy (folder ):
99
105
for root , _ , files in os .walk (folder ):
100
106
for file in files :
101
107
if file not in prune :
102
108
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 )
104
110
recursive_copy ('src' )
105
111
recursive_copy ('test' )
106
112
recursive_copy ('example' )
107
113
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 )
109
115
return
110
116
111
117
def fpm_build (args ,unknown ):
@@ -161,7 +167,7 @@ def fpm_build(args,unknown):
161
167
# pre process the meta programming fypp files
162
168
pre_process_fypp (args )
163
169
if args .deploy_stdlib_fpm :
164
- deploy_stdlib_fpm ()
170
+ deploy_stdlib_fpm (args . with_ilp64 )
165
171
#==========================================
166
172
# build using fpm
167
173
if args .build :
0 commit comments