Skip to content

Commit

Permalink
feat: remove distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
vrenaville committed Nov 28, 2024
1 parent 9ee3405 commit 37142e6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Unreleased

**Bugfixes**

* move from disutils (removed on python 3.12) to setuptools

**Improvements**

* I18N overwrite option
Expand Down
2 changes: 1 addition & 1 deletion marabunta/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from distutils.util import strtobool
from .strtobool import strtobool
import argparse
import os

Expand Down
21 changes: 21 additions & 0 deletions marabunta/strtobool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
_MAP = {
"y": True,
"yes": True,
"t": True,
"true": True,
"on": True,
"1": True,
"n": False,
"no": False,
"f": False,
"false": False,
"off": False,
"0": False,
}


def strtobool(value):
try:
return _MAP[str(value).lower()]
except KeyError as error:
raise ValueError(f'"{value}" is not a valid bool value') from error
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
license='AGPLv3+',
packages=find_packages(exclude=('tests', 'docs')),
install_requires=[
"psycopg2",
"ruamel.yaml>=0.15.1",
"pexpect",
"werkzeug",
"future",
#"psycopg2",
#"ruamel.yaml>=0.15.1",
#"pexpect",
#"werkzeug",
#"setuptools",
#"future",
],
setup_requires=[
'setuptools_scm',
Expand Down

0 comments on commit 37142e6

Please sign in to comment.