Python package setup (initial approach) #212
Open
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.
Adds an initial Python packaging setup.
bin/folder tosrc/(to match the src layout recommended by Python packaging)LucasR.pymodule tomain.py__name__ == "__main__"´name guard to themain.pymodule (to allow launching the app via an entrypoint scriptlucas-chess)Usage
Build the wheel and source distribution:
This will create 2 large files (a wheel and a source distribution) as a Python package:
Both resulting package files can directly be installed (in a virtual environment) via
Alternatively, you can install them from source off the GitHub repository directly via
Once the package is installed, the application can be run from the terminal via
Alternatively, the application can still be run from source code like this:
Notes
lucas-chesswill abort with a segmentation fault when executed. This is because theManager.pymodule loads theFasterCodelibrary, which is included as a pre-built library (apparently built with Python 3.8). With Python 3.8 aModuleNotFoundError: No module named 'FasterCode'stops the startup, reported by the shiboken2 module.pip install lucas-chess) #203 (comment) it makes sense to refactor how the engines are loaded. It would also make sense to distribute the engines independently from the Python application.