13 lines
322 B
Python
13 lines
322 B
Python
import os
|
|
import subprocess
|
|
|
|
def build():
|
|
os.environ["CGO_ENABLED"] = "1"
|
|
subprocess.run(["go", "build", "-tags", "netcgo"], check=True)
|
|
|
|
def install(args=[], chdir=True):
|
|
os.environ["GOBIN"] = f"{os.getcwd()}/../_gobin"
|
|
subprocess.run(["go", "install"] + args)
|
|
if chdir:
|
|
os.chdir("../_gobin")
|