Skip to content

Commit

Permalink
setup.py: Add support for minor libsystemd versions like "252.9"
Browse files Browse the repository at this point in the history
  • Loading branch information
igo95862 committed Dec 16, 2023
1 parent 0bd93c3 commit bda45df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ def get_libsystemd_version() -> int:
stderr=DEVNULL,
stdout=PIPE,
check=True,
text=True,
)

result_str = process.stdout.decode('utf-8')
result_str = process.stdout
# Version can either be like 250 or 250.10
first_component = result_str.split(".")[0]

return int(result_str)
return int(first_component)


if not environ.get('PYTHON_SDBUS_USE_IGNORE_SYSTEMD_VERSION'):
Expand Down

0 comments on commit bda45df

Please sign in to comment.