Skip to content

Commit

Permalink
conditionally used xdg or xdg-base-dir based on pyversion
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmeagher committed Oct 4, 2023
1 parent 49b937f commit 334cb83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion multizone.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@
from babel.core import default_locale
from babel.dates import format_datetime
from termcolor import colored
from xdg_base_dirs import xdg_config_home

if sys.version_info < (3, 9):
from backports import zoneinfo
else:
import zoneinfo
if sys.version_info < (3, 10):
from xdg_base_dirs import xdg_config_home
else:
from xdg import xdg_config_home
if sys.version_info < (3, 11):
import tomli as tomllib
else:
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ classifiers = [
"Topic :: Utilities"
]
dependencies = [
"backports.zoneinfo; python_version < '3.9'",
"babel",
"backports.zoneinfo; python_version < '3.9'",
"tabulate",
"tzlocal",
"xdg-base-dirs",
"termcolor",
"tomli; python_version < '3.11'"
"tomli; python_version < '3.11'",
"tzlocal",
"xdg; python_version < '3.10'",
"xdg-base-dirs; python_version >= '3.10'"
]
dynamic = ["version", "description"]
license = {file = "COPYING"}
Expand Down

0 comments on commit 334cb83

Please sign in to comment.