wip: build system refactoring draft #1312
Draft
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.
Import version and gi_versions from pyproject.toml
Was part of the PR for #1311 but I decided to go a different route because this is not worth it (at least not yet). I mostly wanted to keep this for future reference.
I'm note sure the way the tomli version is specified is correct and works for building the deb package (Seems not for the deb, but looks correct according to the "platform specific dependencies" docs).
_project_root = Path(__file__).parent.parent
also doesn't work on Niximportlib.metadata.version("ulauncher")
is NOT an alternative. I tested it it had some nasty side effects and limitations:sys.path.insert(0, str(PROJECT_ROOT))
hack or it would throwimportlib.metadata.PackageNotFoundError
. This was not needed on my Arch Linux desktop with Python 3.11.1.2.3-beta4
to1.2.3-b4
(this will break our deb builds).6.0.0b4
even though I didn't have any version installed)