diff options
| author | Arun Isaac <arunisaac@systemreboot.net> | 2026-07-03 04:06:47 +0100 |
|---|---|---|
| committer | Arun Isaac <arunisaac@systemreboot.net> | 2026-07-03 04:09:38 +0100 |
| commit | a1720481bfd4c50ffbc1af705dc0f31af3e7803e (patch) | |
| tree | 7a52c45403f4aacbc8ac5ecd415231df5fba3f09 /gnu | |
| parent | 647956378ef748fa677b9c3b13bbcb8cda63ea37 (diff) | |
gnu: python-klaus: Patch to support python 3.12.
* gnu/packages/patches/python-klaus-support-python-3.12.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/version-control.scm (python-klaus)[source]: Use it.
Change-Id: I2a6a228a318b28bc071d5f368c5ab828f8f84b9f
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/python-klaus-support-python-3.12.patch | 54 | ||||
| -rw-r--r-- | gnu/packages/version-control.scm | 4 |
3 files changed, 58 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 5cbf117a148..4e8dfa74e7a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2138,6 +2138,7 @@ dist_patch_DATA = \ | |||
| 2138 | %D%/packages/patches/python-hdmedians-replace-nose.patch \ | 2138 | %D%/packages/patches/python-hdmedians-replace-nose.patch \ |
| 2139 | %D%/packages/patches/python-holodeck-cython-3-compat.patch \ | 2139 | %D%/packages/patches/python-holodeck-cython-3-compat.patch \ |
| 2140 | %D%/packages/patches/python-jinja2-fragments-modify-conftest-py.patch \ | 2140 | %D%/packages/patches/python-jinja2-fragments-modify-conftest-py.patch \ |
| 2141 | %D%/packages/patches/python-klaus-support-python-3.12.patch \ | ||
| 2141 | %D%/packages/patches/python-louvain-fix-test.patch \ | 2142 | %D%/packages/patches/python-louvain-fix-test.patch \ |
| 2142 | %D%/packages/patches/python-mohawk-pytest.patch \ | 2143 | %D%/packages/patches/python-mohawk-pytest.patch \ |
| 2143 | %D%/packages/patches/python-msal-requests.patch \ | 2144 | %D%/packages/patches/python-msal-requests.patch \ |
diff --git a/gnu/packages/patches/python-klaus-support-python-3.12.patch b/gnu/packages/patches/python-klaus-support-python-3.12.patch new file mode 100644 index 00000000000..ca13d1c7cfa --- /dev/null +++ b/gnu/packages/patches/python-klaus-support-python-3.12.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | From 0dacec59248446c3dbadcb83e23bbddcd9ce94db Mon Sep 17 00:00:00 2001 | ||
| 2 | From: fin444 <fin444@users.noreply.github.com> | ||
| 3 | Date: Mon, 15 Jul 2024 07:00:12 -0400 | ||
| 4 | Subject: [PATCH] python 3.12 support (#334) | ||
| 5 | |||
| 6 | --- | ||
| 7 | klaus/contrib/app_args.py | 11 ++++++++++- | ||
| 8 | setup.py | 13 ------------- | ||
| 9 | 2 files changed, 10 insertions(+), 14 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/klaus/contrib/app_args.py b/klaus/contrib/app_args.py | ||
| 12 | index 7ee56891..ba02e53e 100644 | ||
| 13 | --- a/klaus/contrib/app_args.py | ||
| 14 | +++ b/klaus/contrib/app_args.py | ||
| 15 | @@ -1,5 +1,14 @@ | ||
| 16 | import os | ||
| 17 | -from distutils.util import strtobool | ||
| 18 | + | ||
| 19 | + | ||
| 20 | +def strtobool(val): | ||
| 21 | + val = val.lower() | ||
| 22 | + if val in ("y", "yes", "t", "true", "on", "1"): | ||
| 23 | + return 1 | ||
| 24 | + elif val in ("n", "no", "f", "false", "off", "0"): | ||
| 25 | + return 0 | ||
| 26 | + else: | ||
| 27 | + raise ValueError(f"invalid truth value {val!r}") | ||
| 28 | |||
| 29 | |||
| 30 | def get_args_from_env(): | ||
| 31 | diff --git a/setup.py b/setup.py | ||
| 32 | index b06a45f2..2d1f594c 100644 | ||
| 33 | --- a/setup.py | ||
| 34 | +++ b/setup.py | ||
| 35 | @@ -4,19 +4,6 @@ | ||
| 36 | |||
| 37 | long_description = open(os.path.join(os.path.dirname(__file__), "README.rst")).read() | ||
| 38 | |||
| 39 | - | ||
| 40 | -def install_data_files_hack(): | ||
| 41 | - # This is a clever hack to circumvent distutil's data_files | ||
| 42 | - # policy "install once, find never". Definitely a TODO! | ||
| 43 | - # -- https://groups.google.com/group/comp.lang.python/msg/2105ee4d9e8042cb | ||
| 44 | - from distutils.command.install import INSTALL_SCHEMES | ||
| 45 | - | ||
| 46 | - for scheme in INSTALL_SCHEMES.values(): | ||
| 47 | - scheme["data"] = scheme["purelib"] | ||
| 48 | - | ||
| 49 | - | ||
| 50 | -install_data_files_hack() | ||
| 51 | - | ||
| 52 | requires = [ | ||
| 53 | "flask", | ||
| 54 | "Werkzeug>=0.15.0", | ||
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index cd33ccf42a3..e7d31245c9f 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm | |||
| @@ -871,7 +871,9 @@ everything from small to very large projects with speed and efficiency.") | |||
| 871 | (uri (pypi-uri "klaus" version)) | 871 | (uri (pypi-uri "klaus" version)) |
| 872 | (sha256 | 872 | (sha256 |
| 873 | (base32 | 873 | (base32 |
| 874 | "1w6sl15llnkcg7kmnpn64awdiis061q2gijnhdx0ng7z4p1glapl")))) | 874 | "1w6sl15llnkcg7kmnpn64awdiis061q2gijnhdx0ng7z4p1glapl")) |
| 875 | (patches | ||
| 876 | (search-patches "python-klaus-support-python-3.12.patch")))) | ||
| 875 | (build-system pyproject-build-system) | 877 | (build-system pyproject-build-system) |
| 876 | (arguments | 878 | (arguments |
| 877 | (list | 879 | (list |
