I have a script that pulls in data from a server drive where I do not have the ability to alter the directory names and they all have spaces in them. I am using a Makefile to run the script (in Windows) and it is presenting a problem.
My initial workaround is having a python script run before make is called to copy the data from the server into my local folder, and it looks like this:
# grab_data.py
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output", help="output filepath")
args = parser.parse_args()
output_path = Path(args.output)
src = 'S:/Server Path/To Data I Need/File I Need.xlsx'
dst = output_path
shutil.copyfile(src, dst)
And I run my Makefile like this:
.PHONY : runall
runall : data/file_i_need.xlsx final_output.csv
python grab_data.py - o data/file_i_need.xlsx
final_output.csv : data/file_i_need.xlsx processing_script.py
python processing_script.py -i $< -o $@
I want to find some way to include the file 'S:/Server Path/To Data I Need/File I Need.xlsx' directly in the Makefile but cannot figure out what will work. Is there some other workaround that would allow me to do this?