fix: babel 2.14+ and python 3.12+ setuptools dependency

This commit is contained in:
Éloi Rivard 2024-03-26 09:05:33 +01:00 committed by zorun
parent 510c8db07f
commit ae1cc309d7
2 changed files with 7 additions and 6 deletions

View file

@ -56,11 +56,6 @@ jobs:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
dependencies: [normal] dependencies: [normal]
database: [sqlite] database: [sqlite]
# Installation breaks with python 3.12, see https://github.com/spiral-project/ihatemoney/issues/1297
exclude:
- python-version: "3.12"
dependencies: normal
database: sqlite
# Test other databases with only a few versions of Python (Debian bullseye has 3.9, bookworm has 3.11) # Test other databases with only a few versions of Python (Debian bullseye has 3.9, bookworm has 3.11)
include: include:
- python-version: 3.9 - python-version: 3.9

View file

@ -88,7 +88,13 @@ ihatemoney = "ihatemoney.manage:cli"
[tool.hatch.build.hooks.custom] [tool.hatch.build.hooks.custom]
dependencies = [ dependencies = [
# Babel is needed to compile translations catalogs at package build time # Babel is needed to compile translations catalogs at package build time
"Babel>=2.13.1" "Babel>=2.13.1",
# Babel 2.14 does not directly depend on setuptools
# https://github.com/python-babel/babel/blob/40e60a1f6cf178d9f57fcc14f157ea1b2ab77361/CHANGES.rst?plain=1#L22-L24
# and neither python 3.12 due to PEP 632
# https://peps.python.org/pep-0632/
"setuptools; python_version>='3.12'",
] ]
[tool.hatch.build] [tool.hatch.build]