MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / build_mysql_env

Method build_mysql_env

mod/project/python/pyenv_tool.py:371–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369
370 @staticmethod
371 def build_mysql_env() -> str:
372 if os.path.exists("/www/server/mysql"):
373 return (
374 "export LD_LIBRARY_PATH=\"/www/server/mysql/lib:$LD_LIBRARY_PATH\""
375 "export MYSQLCLIENT_CFLAGS='-I/www/server/mysql/include'\n"
376 "export MYSQLCLIENT_LDFLAGS='-L/www/server/mysql/lib -lmysqlclient'\n"
377 )
378 elif os.path.exists("/usr/local/mysql"):
379 return (
380 "export MYSQLCLIENT_CFLAGS='-I/usr/local/mysql/include'\n"
381 "export MYSQLCLIENT_LDFLAGS='-L/usr/local/mysql/lib -lmysqlclient'\n"
382 )
383 else:
384 return ""
385
386 def pip_uninstall(self, pkg: str, call_log:Optional[Callable[[str], None]] = None) -> Optional[str]:
387 if not self.pip_bin():

Callers 1

pip_installMethod · 0.95

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected