From 42325673135b988f2fbbfec9ad2174ba24af8cf9 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 14 Aug 2024 06:37:57 +0800 Subject: [PATCH] ceph-volume: add "packaging" to install_requires in 0985e201, "packaging" was introduced as a runtime dependency of ceph-volume, and `ceph.spec.in` was updated accordingly to note this new dependency. but the debian packaging was not updated. in 80edcd40, the missing dependency was added to debian/control as one of ceph-volume's runtime dependency. but dh_python3 is able to figure out the dependencies by reading the egg's metadata of the ceph-volume python module. and as a python project, ceph-volume is using its `setup.py` for tracking its dependencies. so in order to be more consistent, and keep all of its dependencies in one place, let's move this dependency to setup.py . as the packagings in both distros are able to figure the dependencies from egg-info. see also - https://manpages.debian.org/testing/dh-python/dh_python3.1.en.html#dependencies - https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_201x/#_automatically_generated_dependencies Signed-off-by: Kefu Chai (cherry picked from commit 729fd8e25ff2bfbcf99790d6cd08489d1c4e2ede) --- ceph.spec.in | 1 - debian/control | 1 - src/ceph-volume/setup.py | 5 ++++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 5f432779a89b6..27b534bd5e63c 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -927,7 +927,6 @@ Requires: parted Requires: util-linux Requires: xfsprogs Requires: python%{python3_pkgversion}-setuptools -Requires: python%{python3_pkgversion}-packaging Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release} %description volume This package contains a tool to deploy OSD with different devices like diff --git a/debian/control b/debian/control index 7b12163875e63..041dfcc7980e8 100644 --- a/debian/control +++ b/debian/control @@ -432,7 +432,6 @@ Depends: ceph-osd (= ${binary:Version}), e2fsprogs, lvm2, parted, - python3-packaging, xfsprogs, ${misc:Depends}, ${python3:Depends} diff --git a/src/ceph-volume/setup.py b/src/ceph-volume/setup.py index 44a0d0e468997..fa49a95cdd057 100644 --- a/src/ceph-volume/setup.py +++ b/src/ceph-volume/setup.py @@ -14,7 +14,10 @@ setup( keywords='ceph volume disk devices lvm', url="https://github.com/ceph/ceph", zip_safe = False, - install_requires='ceph', + install_requires=[ + 'ceph', + 'packaging', + ], dependency_links=[''.join(['file://', os.path.join(os.getcwd(), '../', 'python-common#egg=ceph-1.0.0')])], tests_require=[ -- 2.39.5