diff --git a/.gitignore b/.gitignore index a09c56d..dc621d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/.idea +.idea +dist diff --git a/core/Constants.py b/core/Constants.py index 201c1ce..65da807 100644 --- a/core/Constants.py +++ b/core/Constants.py @@ -6,8 +6,6 @@ import os @dataclass(frozen=True) class Constants: - SP_CLIENT_VERSION: Final[str] = '1.0.0' - HOME: Final[str] = os.path.expanduser('~') SYSTEM_CONFIG_PATH: Final[str] = '/etc' diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/controllers/ClientController.py b/core/controllers/ClientController.py index 486efe4..91d2b9c 100644 --- a/core/controllers/ClientController.py +++ b/core/controllers/ClientController.py @@ -17,14 +17,6 @@ class ClientController: def get_working_directory(): return str(pathlib.Path(__file__).resolve().parent.parent.parent) - @staticmethod - def get_version(): - return ClientVersionController.get(Constants.SP_CLIENT_VERSION) - - @staticmethod - def can_be_updated(): - return not ClientVersionController.is_latest(ClientController.get_version()) - @staticmethod def sync(client_observer: ClientObserver = None, connection_observer: ConnectionObserver = None): diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2f00283 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[project] +name = "sp-client-core" +version = "0.0.1" +authors = [ + { name = "Simplified Privacy" }, +] +description = "A library that exposes core client logic to higher-level components." +readme = "README.md" +requires-python = ">=3.12" +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: POSIX :: Linux", +] +dependencies = [ + "dataclasses-json ~= 0.6.4", + "marshmallow ~= 3.21.1", + "psutil ~= 5.9.8", + "pysocks ~= 1.7.1", + "python-dateutil ~= 2.9.0.post0", + "pytz ~= 2024.1", + "requests ~= 2.32.0", +] + +[project.urls] +Homepage = "https://git.simplifiedprivacy.is/codeking/sp-client-core" +Issues = "https://git.simplifiedprivacy.is/codeking/sp-client-core/issues" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["core"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index ea0e0e0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -dataclasses-json~=0.6.4 -marshmallow~=3.21.1 -psutil~=5.9.8 -pysocks~=1.7.1 -python-dateutil~=2.9.0.post0 -pytz~=2024.1 -requests~=2.32.0