| 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(): |