diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2026-05-26 15:25:36 +0200 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2026-05-29 09:32:44 +0200 |
| commit | d746ef33f366afb5366822f82c6fa7d1b66bf39c (patch) | |
| tree | 4cd63d7c1071b839bba030541faa942cd0bdf79c /patches | |
| parent | 071c5d7f3f84e7f203afc6acb2bdbf66ca5f0962 (diff) | |
machine-learning: Update python-ray patch for Python 3.12.
Python 3.12 removed distutils. This commit moves all substitutions of
WORKSPACE into a patch file and patches out the CI dependency
buildkite, which relied on distutils.
* guix-science/packages/machine-learning.scm (python-ray/wheel)[arguments]:
Move substitutions for WORKSPACE into a patch file.
[source]: Reference that patch file here.
* patches/python-ray.patch: New file.
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/python-ray.patch | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/patches/python-ray.patch b/patches/python-ray.patch new file mode 100644 index 0000000..c66226b --- /dev/null +++ b/patches/python-ray.patch | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | --- a/WORKSPACE | ||
| 2 | +++ b/WORKSPACE | ||
| 3 | @@ -10,6 +10,69 @@ | ||
| 4 | ], | ||
| 5 | ) | ||
| 6 | |||
| 7 | +new_local_repository( | ||
| 8 | + name = "openssl", | ||
| 9 | + path = "@GUIX_OPENSSL@", | ||
| 10 | + build_file_content = """ | ||
| 11 | +cc_library( | ||
| 12 | + name = "openssl", | ||
| 13 | + includes = ["include"], | ||
| 14 | + linkopts = ["-lssl", "-lcrypto"], | ||
| 15 | + visibility = ["//visibility:public"], | ||
| 16 | +) | ||
| 17 | +""", | ||
| 18 | +) | ||
| 19 | +new_local_repository( | ||
| 20 | + name = "jemalloc", | ||
| 21 | + path = "@GUIX_JEMALLOC@", | ||
| 22 | + build_file_content = """ | ||
| 23 | +cc_library( | ||
| 24 | + name = "libjemalloc", | ||
| 25 | + includes = ["include"], | ||
| 26 | + linkopts = ["-ljemalloc", "-ldl"], | ||
| 27 | + visibility = ["//visibility:public"], | ||
| 28 | +) | ||
| 29 | +filegroup( | ||
| 30 | + name = "shared", | ||
| 31 | + srcs = [], | ||
| 32 | + visibility = ["//visibility:public"], | ||
| 33 | +) | ||
| 34 | +""", | ||
| 35 | +) | ||
| 36 | + | ||
| 37 | +new_local_repository( | ||
| 38 | + name = "com_github_antirez_redis", | ||
| 39 | + path = "@GUIX_REDIS@", | ||
| 40 | + build_file_content = """ | ||
| 41 | +filegroup( | ||
| 42 | + name = "redis-server", | ||
| 43 | + srcs = ["bin/redis-server"], | ||
| 44 | + visibility = ["//visibility:public"], | ||
| 45 | +) | ||
| 46 | +filegroup( | ||
| 47 | + name = "redis-cli", | ||
| 48 | + srcs = ["bin/redis-cli"], | ||
| 49 | + visibility = ["//visibility:public"], | ||
| 50 | +) | ||
| 51 | +""", | ||
| 52 | +) | ||
| 53 | +new_local_repository( | ||
| 54 | + name = "com_github_redis_hiredis", | ||
| 55 | + path = "@GUIX_HIREDIS@", | ||
| 56 | + build_file_content = """ | ||
| 57 | +cc_library( | ||
| 58 | + name = "hiredis", | ||
| 59 | + includes = ["include"], | ||
| 60 | + linkopts = ["-lhiredis", "-lhiredis_ssl"], | ||
| 61 | + visibility = ["//visibility:public"], | ||
| 62 | +) | ||
| 63 | +""", | ||
| 64 | +) | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + | ||
| 70 | load("//bazel:ray_deps_setup.bzl", "ray_deps_setup") | ||
| 71 | |||
| 72 | ray_deps_setup() | ||
| 73 | @@ -47,6 +110,7 @@ | ||
| 74 | ) | ||
| 75 | |||
| 76 | load("@rules_python//python:repositories.bzl", "python_register_toolchains") | ||
| 77 | +load("@rules_python//python:repositories.bzl", "py_repositories") | ||
| 78 | |||
| 79 | python_register_toolchains( | ||
| 80 | name = "python3_9", | ||
| 81 | @@ -54,24 +118,7 @@ | ||
| 82 | register_toolchains = False, | ||
| 83 | ) | ||
| 84 | |||
| 85 | -load("@python3_9//:defs.bzl", python39 = "interpreter") | ||
| 86 | -load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies") | ||
| 87 | - | ||
| 88 | -pip_install_dependencies() | ||
| 89 | - | ||
| 90 | -load("@rules_python//python:pip.bzl", "pip_parse") | ||
| 91 | - | ||
| 92 | -pip_parse( | ||
| 93 | - name = "py_deps_buildkite", | ||
| 94 | - python_interpreter_target = python39, | ||
| 95 | - requirements_lock = "//release:requirements_buildkite.txt", | ||
| 96 | -) | ||
| 97 | - | ||
| 98 | -load("@py_deps_buildkite//:requirements.bzl", install_py_deps_buildkite = "install_deps") | ||
| 99 | - | ||
| 100 | -install_py_deps_buildkite() | ||
| 101 | - | ||
| 102 | -register_toolchains("//:python_toolchain") | ||
| 103 | +register_toolchains("@bazel_tools//tools/python:autodetecting_toolchain") | ||
| 104 | |||
| 105 | register_execution_platforms( | ||
| 106 | "@local_config_platform//:host", | ||
