]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: use syntax supported by python3.6 56544/head
authorAlexander Indenbaum <aindenba@redhat.com>
Thu, 28 Mar 2024 07:20:11 +0000 (07:20 +0000)
committerAlexander Indenbaum <aindenba@redhat.com>
Fri, 29 Mar 2024 16:04:21 +0000 (16:04 +0000)
Fixes: f68248944815acbf5fb08ef66f36da6d5baef824
It seems the shaman CentOS8 builders, which serve as the base for container images, aren't current with the ":=" syntax. Amend to support RHEL8, whose default python is python 3.6.8.

Error example from https://shaman.ceph.com/builds/ceph/ceph-nvmeof-mon/27188b78bdbaa3c33de518b8514906de629e774a/default/388913/

  File "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-2505-g27188b78/rpm/el8/BUILD/ceph-19.0.0-2505-g27188b78/src/pybind/cephfs/setup.py", line 120
    if ldflags := os.environ.get('LDFLAGS'):
                ^
SyntaxError: invalid syntax

Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
src/pybind/cephfs/setup.py
src/pybind/rados/setup.py
src/pybind/rbd/setup.py
src/pybind/rgw/setup.py

index 956a4e7008c6aa4ad38874d6d6185f57ea1c3a65..e6547103c705100983a899256d239dcb70529f1a 100755 (executable)
@@ -117,7 +117,8 @@ def check_sanity():
             extra_preargs=['-iquote{path}'.format(path=os.path.join(CEPH_SRC_DIR, 'include'))]
         )
 
-        if ldflags := os.environ.get('LDFLAGS'):
+        ldflags = os.environ.get('LDFLAGS')
+        if ldflags:
             extra_postargs = ldflags.split()
         else:
             extra_postargs = None
index 000189b7da134f96eed49b240b468c58421f48da..cd99fb457c177a1a773480d36f0fdf804632823d 100755 (executable)
@@ -112,7 +112,8 @@ def check_sanity():
             sources=[tmp_file],
             output_dir=tmp_dir
         )
-        if ldflags := os.environ.get('LDFLAGS'):
+        ldflags = os.environ.get('LDFLAGS')
+        if ldflags:
             extra_postargs = ldflags.split()
         else:
             extra_postargs = None
index b03d1c3fc9576ebeb50cd539702689805d4c8501..4f247273796e3e88f7721653865f87a5386c8ce4 100755 (executable)
@@ -116,7 +116,8 @@ def check_sanity():
             output_dir=tmp_dir
         )
 
-        if ldflags := os.environ.get('LDFLAGS'):
+        ldflags = os.environ.get('LDFLAGS')
+        if ldflags:
             extra_postargs = ldflags.split()
         else:
             extra_postargs = None
index eb8fc554db6eea6b15d47b9338e9d59fad68493d..a39f8d4e54539ad7b48de94542de1fe839236d3b 100755 (executable)
@@ -116,7 +116,8 @@ def check_sanity():
             output_dir=tmp_dir,
         )
 
-        if ldflags := os.environ.get('LDFLAGS'):
+        ldflags = os.environ.get('LDFLAGS')
+        if ldflags:
             extra_postargs = ldflags.split()
         else:
             extra_postargs = None