forked from jblindsay/whitebox-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.py
30 lines (22 loc) · 1.06 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import platform, subprocess
from shutil import copyfile
result = subprocess.run(['cargo', '+nightly', 'build', '--release', '--out-dir=\"../WBT/{exe_name}\"', '-Z unstable-options'], stdout=subprocess.PIPE)
print(result.stdout)
# ext = ""
# if platform.system() == 'Windows':
# ext = '.exe'
# exe_name = f"whitebox_tools{ext}"
# src = f"./target/release/{exe_name}"
# dst = f"../WBT/{exe_name}"
# copyfile(src, dst)
# result = subprocess.run(["pwd"], stdout=subprocess.PIPE)
# print("pwd: ", result.stdout)
# result = subprocess.run(["codesign -h"], stdout=subprocess.PIPE)
# print("", result.stdout)
# args = []
# args.append("./WBT/whitebox_tools")
# args.append("-run='recreate_pass_lines'")
# args.append("--inputFile='/Users/johnlindsay/Documents/data/yield/Woodrill_UTM.shp' --yieldFieldName='Yld_Mass_D' --outputFile='/Users/johnlindsay/Documents/data/yield/pass_lines.shp' --outputPointsFile='/Users/johnlindsay/Documents/data/yield/points.shp' --maxChangeInHeading=25.0")
# result = subprocess.run(args, stdout=subprocess.PIPE)
# print(result.stdout)
print("Done!")