MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / get_fastdeploy_version

Function get_fastdeploy_version

fastdeploy/collect_env.py:272–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270
271
272def get_fastdeploy_version():
273 import pkg_resources
274
275 version = os.environ.get("FASTDEPLOY_VERSION")
276 if version:
277 return version
278
279 try:
280 return pkg_resources.get_distribution("fastdeploy").version
281 except:
282 pass
283
284 try:
285 result = subprocess.run(["pip", "show", "fastdeploy"], capture_output=True, text=True)
286 if result.returncode == 0:
287 for line in result.stdout.split("\n"):
288 if line.startswith("Version:"):
289 return line.split(":")[1].strip()
290 except:
291 pass
292
293 return "unknown (could not determine version)"
294
295
296def summarize_fastdeploy_build_flags():

Callers 1

get_env_infoFunction · 0.85

Calls 3

splitMethod · 0.80
getMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected