Skip to content

Commit fd5488e

Browse files
author
Alexander Indenbaum
committed
pybind: use syntax supported by python3.6
Fixes: f682489 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 <[email protected]>
1 parent 87a931c commit fd5488e

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/pybind/cephfs/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ def check_sanity():
117117
extra_preargs=['-iquote{path}'.format(path=os.path.join(CEPH_SRC_DIR, 'include'))]
118118
)
119119

120-
if ldflags := os.environ.get('LDFLAGS'):
120+
ldflags = os.environ.get('LDFLAGS')
121+
if ldflags:
121122
extra_postargs = ldflags.split()
122123
else:
123124
extra_postargs = None

src/pybind/rados/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def check_sanity():
112112
sources=[tmp_file],
113113
output_dir=tmp_dir
114114
)
115-
if ldflags := os.environ.get('LDFLAGS'):
115+
ldflags = os.environ.get('LDFLAGS')
116+
if ldflags:
116117
extra_postargs = ldflags.split()
117118
else:
118119
extra_postargs = None

src/pybind/rbd/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def check_sanity():
116116
output_dir=tmp_dir
117117
)
118118

119-
if ldflags := os.environ.get('LDFLAGS'):
119+
ldflags = os.environ.get('LDFLAGS')
120+
if ldflags:
120121
extra_postargs = ldflags.split()
121122
else:
122123
extra_postargs = None

src/pybind/rgw/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def check_sanity():
116116
output_dir=tmp_dir,
117117
)
118118

119-
if ldflags := os.environ.get('LDFLAGS'):
119+
ldflags = os.environ.get('LDFLAGS')
120+
if ldflags:
120121
extra_postargs = ldflags.split()
121122
else:
122123
extra_postargs = None

0 commit comments

Comments
 (0)