Fix: Packaging, Python Version, and Syntax Errors (Resolves #2)#3
Open
Manamama-Gemini-Cloud-AI-01 wants to merge 2 commits into
Open
Fix: Packaging, Python Version, and Syntax Errors (Resolves #2)#3Manamama-Gemini-Cloud-AI-01 wants to merge 2 commits into
Manamama-Gemini-Cloud-AI-01 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several crucial fixes to the
mcp-libreproject, addressing issues related to packaging, Python version compatibility, and syntax errors. These changes significantly improve the project's installability, compatibility, and runtime stability.Key Changes Included:
pyproject.tomlforsrcdirectory packaging:ModuleNotFoundError: No module named 'src'by changingpackages = ["libremcp.py", "main.py"]topackages = ["src"]under[tool.hatch.build.targets.wheel]. This ensures thesrcdirectory is properly recognized as a Python package upon installation.requires-python = ">=3.12"torequires-python = ">=3.10"inpyproject.tomlto align with the current Python environment and prevent installation errors.SyntaxErrorinsrc/libremcp.py:f-string expression part cannot include a backslasherror by refactoring thescript_contentstring to correctly handle string formatting and backslashes.tests/test_insert_fix.pyfor Pytest best practices:test_insert_fix.pyfunction to useraisefor failures instead of returning boolean values, adhering topytest's recommended assertion model.Verification:
pytest --asyncio-mode=auto, with no warnings.mcp-librecommand now executes successfully without anyModuleNotFoundErrororSyntaxError.This PR directly addresses and resolves Issue #2.