Modularize 'cqlsh' for use in python imports and better support for Windows installations #7
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 patch is designed to better integrate this PyPI packager with Apache cqlsh. It does not make code changes to cqlsh.py.
The changes here create a new module 'cqlsh', which is required to use setuptools' Entry Point (https://setuptools.pypa.io/en/latest/userguide/entry_point.html). Entry points provide better platform installation; on Linux it will create a shell script for 'cqlsh' which calls the module; on Windows it will create an .exe file. Currently, this package isn't easy to run on Windows because a file without an extension is not executable.
Note: I've tested these changes on both Linux (MacOS) and Windows 11. The test version of the package can be found at https://test.pypi.org/project/cqlsht/ and installed with:
On Linux, the executable cqlsh file created by setuptools looks like this: