-
Notifications
You must be signed in to change notification settings - Fork 202
pyproject.toml, new build tool, improve github workflows #1221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Owner
Author
|
TODO:
|
Owner
Author
|
@LunNova shell.nix uses setup.py ( |
Contributor
|
Kinda busy right now, could just delete shell.nix. If I'm actively submitting patches and it's convenient to have around again in the future I can PR an updated version. |
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.
closes #1170
pip, in many cases, fails to install data files, which need to go into system paths, and instead puts them (despite them being absolute paths, and common workarounds/fixes) into /usr/lib/python3/inputremapper/usr/share/...
python3 setup.py install is deprecated. So I had to remove the existing installation shell script.
meson fails to install the module into a path that can actually be imported, and its python features require one to specify each individual file of the module.
So instead input-remapper will use a custom python solution. Hopefulls this works well enough to prevent all ModuleNotFoundErrors in the future.
Surprisingly, this is not much more code that would otherwise be required. We already had the data_files list and would need it with meson as well with more boilerplate. The python code to generate translations was already there. We (even with meson) need to figure out the correct python-package target path (see code comments). And on the upside, we have a lot of flexibility and control without having to dig into configuration, unexpected behavior and deal with any further limitations.
This PR also changes github workflows
Important changes for packaging:
setup.py installcannot be used anymorepython3 -m install --root ./foo, which puts all files in the expected target directory structure in root. In my case, on ubuntu 25.04, the module ends up infoo/usr/lib/python3/dist-packages. It picks the best option frompython3 -c "import sys; print(sys.path)"for this. If this is missing a feature to make it helpful for packaging, please let me knowcommit_hash.pyis not built anymore, instead, values are inserted intoinstallation_info.py