[Scons-users] Command with empty action turns a normal file target into a directory
Bill Deegan
bill at baddogconsulting.com
Wed Jun 23 20:37:30 EDT 2021
Lem,
Generally I advise against doing much processing in scons process (aka in
python actions).
You're better off doing such in a script which scons runs.
Please don't do any non-trivial logic in python actions, you're just asking
for trouble.
Additionally by moving the logic into a standalone script, it's easier to
test..
Based on the way you specified the target's SCons has no way of knowing
what type they are (file or directory), so it must be deciding they're
directories, and then creating them as it expects files to be created in
them.
Directories are not "first class" objects in scons, but rather considered
containers.
-Bill
On Wed, Jun 23, 2021 at 5:05 PM Lem Ming <ramboman777 at gmail.com> wrote:
> > Also why are you using a python action?
> I am using Scons as a DAG that takes inputs (.csv) data and use python
> functions to analyse the content of these .csv and output the results into
> a target (.latex, .pdf, .csv, .tar, directory with other files)
>
> > Also doing ` rm .sconsign.dblite` from inside a running SCons will cause
> > errors.
> I am testing the DAG in different circumstances so I get the proper
> results, and also do not mess up my input files.
>
> I still find it strange that, when the action is empty, that the Command
> still does something to the target.
>
> BTW if you know a better program to create a DAG that treats input files
> (.csv for example) and outputs other files, please let me know.
>
> --
> Lem
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20210623/0e0e42b9/attachment.htm>
More information about the Scons-users
mailing list