summaryrefslogtreecommitdiffstats
path: root/src/cephadm/build.py
diff options
context:
space:
mode:
authorJohn Mulligan <jmulligan@redhat.com>2023-12-12 23:14:44 +0100
committerJohn Mulligan <jmulligan@redhat.com>2023-12-13 16:19:00 +0100
commit1ced6bc8894f720ffafb7a2e10d169054ff9fa60 (patch)
treec69bb0c7d364321c5409ac4eba8d742aa878c2c8 /src/cephadm/build.py
parentcepadm: black reformat build.py (diff)
downloadceph-1ced6bc8894f720ffafb7a2e10d169054ff9fa60.tar.xz
ceph-1ced6bc8894f720ffafb7a2e10d169054ff9fa60.zip
cephadm: add comments documenting install spec options to build.py
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Diffstat (limited to 'src/cephadm/build.py')
-rwxr-xr-xsrc/cephadm/build.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cephadm/build.py b/src/cephadm/build.py
index da237174ad0..ef2bfef78fd 100755
--- a/src/cephadm/build.py
+++ b/src/cephadm/build.py
@@ -31,6 +31,23 @@ except ImportError:
log = logging.getLogger(__name__)
+# Fill in the package requirements for the zipapp build below. The PY36_REQUIREMENTS
+# list applies *only* to python 3.6. The PY_REQUIREMENTS list applies to all other
+# python versions. Python lower than 3.6 is not supported by this script.
+#
+# Each item must be a dict with the following fields:
+# - package_spec (REQUIRED, str): A python package requirement in the same style as
+# requirements.txt and pip.
+# - from_source (bool): Try to force a clean no-binaries build using source packages.
+# - unique (bool): If true, this requirement should not be combined with any other
+# on the pip command line.
+# - ignore_suffixes (list of str): A list of file and directory suffixes to EXCLUDE
+# from the final zipapp.
+# - ignore_exact (list of str): A list of exact file and directory names to EXCLUDE
+# from the final zipapp.
+# - custom_pip_args (list of str): A list of additional custom arguments to pass
+# to pip when installing this dependency.
+#
PY36_REQUIREMENTS = [
{
'package_spec': 'MarkupSafe >= 2.0.1, <2.2',
@@ -54,6 +71,11 @@ PY36_REQUIREMENTS = [
PY_REQUIREMENTS = [
{'package_spec': 'MarkupSafe >= 2.1.3, <2.2', 'from_source': True},
{'package_spec': 'Jinja2 >= 3.1.2, <3.2', 'from_source': True},
+ # We can not install PyYAML using sources. Unlike MarkupSafe it requires
+ # Cython to build and Cython must be compiled and there's not clear way past
+ # the requirement in pyyaml's pyproject.toml. Instead, rely on fetching
+ # a platform specific pyyaml wheel and then stripping of the binary shared
+ # object.
{
'package_spec': 'PyYAML >= 6.0, <6.1',
# do not include the stub package for compatibility with