How to add search paths for the file_dep

14 views
Skip to first unread message

Sainath Nambiar

unread,
Jun 5, 2020, 9:38:36 AM6/5/20
to python-doit
Hi All,
           I am new to doit and creating a small snippet to complie a large C project ,  I am stuck at following issue 
I have a project folder "A" in which I have dodo.py file in which there are tasks 
 "A" has sub folder "C" &"D" folder with src codes. How can I add then to the file_dep parameter as when they are added as below they are not to be found by doit.

def task_build():
   
"""-------------->Some project"""
   
Repo = Path.cwd()
   
BRepo = Repo/'B'
   
CRepo = BRepo/'C'
   
DRepo = BorderRouterRepo/'D'
   
CFiles = list(BRepo.glob('**/*.c'))# Got all the .c file from parent
    OBJECTS
= [str(os.path.basename(str(x))) for x in CFiles]


   
return {
       
'actions':  [(buildProject)],
       
'file_dep': OBJECTS,
       
'verbosity': 2,
   
}
Regards
Sainath

Eduardo Schettino

unread,
Jun 5, 2020, 9:41:44 AM6/5/20
to python-doit

Hi,

Paths specified in tasks are relative to `dodo.py` location.
You should NOT be using `os.path.basename`.

Regards

--
You received this message because you are subscribed to the Google Groups "python-doit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-doit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-doit/2086caaa-e087-44b2-bd45-c9274d7b2040o%40googlegroups.com.

Sainath Nambiar

unread,
Jun 5, 2020, 10:56:14 AM6/5/20
to pytho...@googlegroups.com
Thanks added the relative paths and it worked 👍.

Regards
Sainath

Reply all
Reply to author
Forward
0 new messages