Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@
requires = [
"setuptools>=77.0",
"setuptools-scm>=8",
"pyside6-essentials~=6.9", # Needed to build uic files
"pyside6-essentials~=6.9", # Needed to build uic files
]
build-backend = "setuptools.build_meta"

[project]
name="splitguides"
description="A tool for speedrunners to display notes that advance automatically with their splits in Livesplit."
name = "splitguides"
description = "A tool for speedrunners to display notes that advance automatically with their splits in Livesplit."
authors = [
{ name = "David C Ellis" },
{ name = "David C Ellis" },
]
readme="README.md"
requires-python = ">=3.12" # 3.12 should function and build now
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"pyside6~=6.9",
"jinja2~=3.1",
"bleach[css]==6.0", # Each upgrade to bleach has broken something so pin it.
"bleach[css]==6.0", # Each upgrade to bleach has broken something so pin it.
"flask~=3.0",
"markdown~=3.6",
"keyboard~=0.13.5",
"ducktools-classbuilder>=0.7.4",
"waitress~=3.0",
"platformdirs~=4.3",
]
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux", # Should also work on Linux, even if livesplit doesn't
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Games/Entertainment",
Expand Down Expand Up @@ -59,14 +60,7 @@ __version_tuple__ = {version_tuple}
"""

[tool.pytest.ini_options]
addopts= "--cov=src/ --cov-report=term-missing"
addopts = "--cov=src/ --cov-report=term-missing"
testpaths = [
"tests",
]

[tool.uv]
# Only x86_64 / AMD64 is supported
environments = [
"platform_system == 'Windows' and platform_machine == 'AMD64' and implementation_name == 'cpython'",
"platform_system == 'Linux' and platform_machine == 'x86_64' and implementation_name == 'cpython'",
]
7 changes: 4 additions & 3 deletions src/splitguides/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
PROJECT_NAME = "splitguides"

match sys.platform:
# Don't change existing win32/linux config locations
# but let platformdirs handle this for previously unsupported platforms
case "win32":
if _local_app_folder := os.environ.get("LOCALAPPDATA"):
if not os.path.isdir(_local_app_folder):
Expand All @@ -27,9 +29,8 @@
case "linux":
SETTINGS_FOLDER = Path(os.path.expanduser(os.path.join("~", f".{PROJECT_NAME}")))
case other:
raise UnsupportedPlatformError(
f"Platform {other!r} is not currently supported."
)
import platformdirs
SETTINGS_FOLDER = Path(platformdirs.user_config_dir(PROJECT_NAME))

SETTINGS_FOLDER.mkdir(exist_ok=True)

Expand Down
Loading
Loading