in setup.py [0:0]
def get_curl_extra_linker_flags():
# We do not want to build the dependencies during packaging
if platform.system() != "Linux" or os.getenv("BUILD") == "true":
return []
# Build the dependencies
check_call(["./scripts/preinstall.sh"])
# call curl-config to get the required linker flags
cmd = ["./deps/artifacts/bin/curl-config", "--static-libs"]
curl_config = check_output(cmd).decode("utf-8").replace("\n", "")
# It is expected that the result of the curl-config call is similar to
# "/tmp/pip-req-build-g9dlug7g/deps/artifacts/lib/libcurl.a -lidn2"
# we want to return just the extra flags
flags = curl_config.split(" ")[1:]
return flags