ya2 · news · projects · code · about

retrieve test coordinates
[pmachines.git] / ya2 / build / images.py
1 from os.path import dirname
2 from sys import executable
3 from ya2.build.mtprocesser import ProcesserMgr
4
5
6 #TODO refactor: make class ImagesBuilder
7
8
9 def bld_images(files, cores):
10 mp_mgr = ProcesserMgr(cores)
11 list(map(__bld_img, [(str(src), mp_mgr) for src in files]))
12 mp_mgr.run()
13
14
15 def __bld_img(fname_mp_mgr):
16 fname, mp_mgr = fname_mp_mgr
17 curr_path = dirname(__file__)
18 mp_mgr.add('convert "%s" "%s"' % (fname, fname[:-3] + 'dds'))