Skip to content

Commit 135c33e

Browse files
authored
Merge pull request #36 from DavidCEllis/dont-break-other-platforms
Stop intentionally breaking on non-windows, non-linux platforms. This completely balloons the lockfile so just don't look at it.
2 parents 01fcac8 + c2af97f commit 135c33e

3 files changed

Lines changed: 2869 additions & 76 deletions

File tree

pyproject.toml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22
requires = [
33
"setuptools>=77.0",
44
"setuptools-scm>=8",
5-
"pyside6-essentials~=6.9", # Needed to build uic files
5+
"pyside6-essentials~=6.9", # Needed to build uic files
66
]
77
build-backend = "setuptools.build_meta"
88

99
[project]
10-
name="splitguides"
11-
description="A tool for speedrunners to display notes that advance automatically with their splits in Livesplit."
10+
name = "splitguides"
11+
description = "A tool for speedrunners to display notes that advance automatically with their splits in Livesplit."
1212
authors = [
13-
{ name = "David C Ellis" },
13+
{ name = "David C Ellis" },
1414
]
15-
readme="README.md"
16-
requires-python = ">=3.12" # 3.12 should function and build now
15+
readme = "README.md"
16+
requires-python = ">=3.12"
1717
dependencies = [
1818
"pyside6~=6.9",
1919
"jinja2~=3.1",
20-
"bleach[css]==6.0", # Each upgrade to bleach has broken something so pin it.
20+
"bleach[css]==6.0", # Each upgrade to bleach has broken something so pin it.
2121
"flask~=3.0",
2222
"markdown~=3.6",
2323
"keyboard~=0.13.5",
2424
"ducktools-classbuilder>=0.7.4",
2525
"waitress~=3.0",
26+
"platformdirs~=4.3",
2627
]
2728
classifiers = [
2829
"Development Status :: 4 - Beta",
2930
"Operating System :: Microsoft :: Windows",
30-
"Operating System :: POSIX :: Linux", # Should also work on Linux, even if livesplit doesn't
31+
"Operating System :: POSIX :: Linux",
3132
"Programming Language :: Python :: 3.12",
3233
"Programming Language :: Python :: 3.13",
3334
"Topic :: Games/Entertainment",
@@ -59,14 +60,7 @@ __version_tuple__ = {version_tuple}
5960
"""
6061

6162
[tool.pytest.ini_options]
62-
addopts= "--cov=src/ --cov-report=term-missing"
63+
addopts = "--cov=src/ --cov-report=term-missing"
6364
testpaths = [
6465
"tests",
6566
]
66-
67-
[tool.uv]
68-
# Only x86_64 / AMD64 is supported
69-
environments = [
70-
"platform_system == 'Windows' and platform_machine == 'AMD64' and implementation_name == 'cpython'",
71-
"platform_system == 'Linux' and platform_machine == 'x86_64' and implementation_name == 'cpython'",
72-
]

src/splitguides/settings.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
PROJECT_NAME = "splitguides"
1616

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

3435
SETTINGS_FOLDER.mkdir(exist_ok=True)
3536

0 commit comments

Comments
 (0)