Spaces:
Sleeping
Sleeping
Update biopython/mcp_output/mcp_plugin/mcp_service.py
Browse files
biopython/mcp_output/mcp_plugin/mcp_service.py
CHANGED
|
@@ -10,8 +10,14 @@ if source_path not in sys.path:
|
|
| 10 |
from fastmcp import FastMCP
|
| 11 |
|
| 12 |
# Core Biopython utilities from setup.py
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Script entrypoints (aliased to avoid name shadowing)
|
| 17 |
from Scripts.query_pubmed import print_usage as query_pubmed_print_usage
|
|
|
|
| 10 |
from fastmcp import FastMCP
|
| 11 |
|
| 12 |
# Core Biopython utilities from setup.py
|
| 13 |
+
# setup.py expects to be executed from the source root to find Bio/__init__.py
|
| 14 |
+
_orig_cwd = os.getcwd()
|
| 15 |
+
try:
|
| 16 |
+
os.chdir(source_path)
|
| 17 |
+
from setup import can_import as biopy_can_import
|
| 18 |
+
from setup import get_version as biopy_get_version
|
| 19 |
+
finally:
|
| 20 |
+
os.chdir(_orig_cwd)
|
| 21 |
|
| 22 |
# Script entrypoints (aliased to avoid name shadowing)
|
| 23 |
from Scripts.query_pubmed import print_usage as query_pubmed_print_usage
|