[Scons-users] Problems with SCons parallel build
Brady Johnson
bradyallenjohnson at gmail.com
Mon Mar 24 10:25:45 EDT 2014
I was using shutil.make_archive() in one of my own builders, so nothing
needs to be changed in SCons for this.
I cant remember why I originally opted not to use the SCons Tar() function,
but there was a good reason not to :) I think it was because in that
particular builder, I needed to manage several sources and targets as one
unit, and using the Tar() builder in my own builder would have caused
duplicate target problems.
Regards,
Brady
On Mon, Mar 24, 2014 at 1:59 PM, Tom Tanner (BLOOMBERG/ LONDON) <
ttanner2 at bloomberg.net> wrote:
> Are you using shutil.make_archive in one of your own builders? Or is it an
> scons supplied one, in which case it should be changed.
>
> I looked at shutil.make_archive, and it does indeed change into the
> supplied directory, which is a bit painful. Maybe scons could supply an
> implementation which doesn't do that? The tarfile module looks like it
> should be able to cope with this, by using the arcname parameter to add
>
>
> ----- Original Message -----
> From: scons-users at scons.org
> To: scons-users at scons.org
> At: Mar 22 2014 14:35:16
>
>
> At first I thought this problem was caused by the RPM generation that Im
> doing by calling os.system('rpmbuild ...') and perhaps 'rpmbuild' could be
> changing the directory, since the rpm spec files have lots of cd, mkdir,
> etc. But I realized that cant be it, since os.system() spawns a
> subprocess. Upon further investigation, I found the problem to be
> attributed to shutil.make_archive(). Looking at the python docs for the
> utility: http://docs.python.org/2/library/shutil.html I saw the following:
>
> shutil.make_archive(*base_name*, *format*[, *root_dir*[, *base_dir*[,
>> *verbose*[, *dry_run*[, *owner*[, *group*[, *logger*]]]]]]])
>>
>> *...**root_dir* is a directory that will be the root directory of the
>> archive; ie. we typically chdir into *root_dir* before creating the
>> archive.
>> ...
>
> <http://docs.python.org/2/library/shutil.html#shutil.make_archive>
> After changing "shutil.make_archive()" with "os.system('tar czf
> theFile.tgz -C dir files)" it works great!! Ive tested it several times
> with "-j 12" with no problems.
>
> Is there someway we could document this? It would be nice to help people
> avoid this problem in the future.
>
> Regards,
>
> Brady
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140324/95554cac/attachment-0001.htm
More information about the Scons-users
mailing list