Fix packaging to support uvx installation#4
Open
sam-at-luther wants to merge 1 commit intoDEmodoriGatsuO:mainfrom
Open
Fix packaging to support uvx installation#4sam-at-luther wants to merge 1 commit intoDEmodoriGatsuO:mainfrom
sam-at-luther wants to merge 1 commit intoDEmodoriGatsuO:mainfrom
Conversation
Add py_modules=['server'] to setup.py to properly expose the server module for installation via uvx/pip. Without this, the console script entry point 'sharepoint-mcp=server:main' fails with 'ModuleNotFoundError: No module named server' because the server.py file at the repository root is not included in the package. This enables installation via: uvx --from git+https://github.com/DEmodoriGatsuO/sharepoint-mcp sharepoint-mcp Or standard pip installation: pip install git+https://github.com/DEmodoriGatsuO/sharepoint-mcp Tested with: uvx --from . sharepoint-mcp --help
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.
Summary
This PR fixes a packaging issue that prevents installation via
uvxorpipfrom Git.Problem
The current
setup.pydefines a console script entry point:However, the
server.pyfile at the repository root is not properly packaged, causing:Solution
Add
py_modules=['server']tosetup.pyto explicitly include the root-levelserver.pyfile in the package.Changes
packages=find_packages(), + py_modules=['server'], classifiers=[This is a one-line change that enables proper module resolution.
Testing
After this change, the package can be installed and run via:
Verified that the server starts successfully and can handle MCP protocol requests.
Benefits
✅ Enables installation via
uvxfor easy testing and deployment✅ Makes the package pip-installable from Git
✅ No breaking changes to existing functionality
✅ Minimal, focused fix
References