Skip to content

Commit

Permalink
debian: extract python3 packages to a single place
Browse files Browse the repository at this point in the history
to better maintainability

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed May 31, 2022
1 parent ef19547 commit 42f5465
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ ifneq (,$(filter with_system_libs,$(DEB_BUILD_OPTIONS)))
extraopts += -DWITH_SYSTEM_PMDK=ON
endif

# for python3-${pkg} packages
py3_bindings := rados cephfs rbd rgw ceph-argparse ceph-common
# for packages with its own py3dist-overrides files, those file should be named
# like ${pkg}.requires
py3_overrides_packages := $(basename $(notdir $(wildcard debian/*.requires)))
# for python3 applications, the package name is used as it is
py3_packages := cephfs-shell cephfs-top cephadm

%:
dh $@ --buildsystem=cmake --with javahelper,python3,systemd --parallel

Expand Down Expand Up @@ -139,17 +147,15 @@ override_dh_shlibdeps:
dh_shlibdeps -a --exclude=erasure-code --exclude=rados-classes --exclude=compressor --exclude=ceph_crypto

override_dh_python3:
for binding in rados cephfs rbd rgw; do \
dh_python3 -p python3-$$binding; \
@for binding in $(py3_bindings); do \
dh_python3 -p python3-$$binding; \
done
@for pkg in $(py3_overrides_packages); do \
dh_python3 -p $$pkg --requires=debian/$$pkg.requires; \
done
for pkg in $(basename $(notdir $(wildcard debian/*.requires))); do \
dh_python3 -p $$pkg --requires=debian/$$pkg.requires; \
@for pkg in $(py3_packages); do \
dh_python3 -p $$pkg; \
done
dh_python3 -p python3-ceph-argparse
dh_python3 -p python3-ceph-common
dh_python3 -p cephfs-shell
dh_python3 -p cephfs-top
dh_python3 -p cephadm

# do not run tests
override_dh_auto_test:
Expand Down

0 comments on commit 42f5465

Please sign in to comment.