Prepare codebase for distribution
This commit is contained in:
parent
87070cc392
commit
11f0cedf0c
6 changed files with 35 additions and 18 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/.idea
|
||||
.idea
|
||||
dist
|
||||
|
|
|
@ -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'
|
||||
|
|
0
core/__init__.py
Normal file
0
core/__init__.py
Normal file
|
@ -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):
|
||||
|
||||
|
|
33
pyproject.toml
Normal file
33
pyproject.toml
Normal file
|
@ -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"]
|
|
@ -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
|
Loading…
Reference in a new issue