Skip to content

Commit

Permalink
python 3.12 support (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
fin444 authored Jul 15, 2024
1 parent 9eb3fbb commit 0dacec5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
11 changes: 10 additions & 1 deletion klaus/contrib/app_args.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import os
from distutils.util import strtobool


def strtobool(val):
val = val.lower()
if val in ("y", "yes", "t", "true", "on", "1"):
return 1
elif val in ("n", "no", "f", "false", "off", "0"):
return 0
else:
raise ValueError(f"invalid truth value {val!r}")


def get_args_from_env():
Expand Down
13 changes: 0 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@

long_description = open(os.path.join(os.path.dirname(__file__), "README.rst")).read()


def install_data_files_hack():
# This is a clever hack to circumvent distutil's data_files
# policy "install once, find never". Definitely a TODO!
# -- https://groups.google.com/group/comp.lang.python/msg/2105ee4d9e8042cb
from distutils.command.install import INSTALL_SCHEMES

for scheme in INSTALL_SCHEMES.values():
scheme["data"] = scheme["purelib"]


install_data_files_hack()

requires = [
"flask",
"Werkzeug>=0.15.0",
Expand Down

0 comments on commit 0dacec5

Please sign in to comment.