mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
Merge pull request #390 from aclist/fix/ctypes-libgi
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
fix: platform-agnostic shared library check
This commit is contained in:
3 files changed
+5
-6
No files matched your search
@@ -26,7 +26,7 @@ You can install it via the following set of commands:
|
|||||||
.. code:: console
|
.. code:: console
|
||||||
|
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libgirepository-2.0
|
sudo apt install libgirepository-2.0-0
|
||||||
|
|
||||||
Next steps
|
Next steps
|
||||||
---------------
|
---------------
|
||||||
|
|||||||
+3
-4
@@ -1,11 +1,12 @@
|
|||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pathlib import Path
|
from ctypes.util import find_library
|
||||||
from warnings import deprecated
|
from warnings import deprecated
|
||||||
|
|
||||||
LIB = "libgirepository-2.0"
|
LIB = "libgirepository-2.0"
|
||||||
|
|
||||||
|
|
||||||
@deprecated("currently unused")
|
@deprecated("currently unused")
|
||||||
def is_debian() -> bool:
|
def is_debian() -> bool:
|
||||||
"""
|
"""
|
||||||
@@ -39,9 +40,7 @@ def is_debian() -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def has_libgi() -> bool:
|
def has_libgi() -> bool:
|
||||||
parent_dir = Path("/usr/lib64")
|
return bool(find_library("girepository-2.0"))
|
||||||
exists = any(LIB in subdir.name for subdir in parent_dir.iterdir())
|
|
||||||
return exists
|
|
||||||
|
|
||||||
|
|
||||||
def test_libgi_missing() -> None:
|
def test_libgi_missing() -> None:
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux"
|
|||||||
authors = [
|
authors = [
|
||||||
{name = "aclist"}
|
{name = "aclist"}
|
||||||
]
|
]
|
||||||
version = "7.0.0b14"
|
version = "7.0.0b15"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
Reference in new issue
Block a user