Project

General

Profile

Actions

Bug #56658

closed

build: cephfs-shell fails to build/install with python setuptools >= v61

Added by Tim Serong almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

python setuptools v61 changed package discovery so that if it finds what it thinks are multiple top-level packages in a directory, it will fail to build. This was introduced by https://github.com/pypa/setuptools/pull/3177, and causes the ceph RPM build to fail with:

...
[ 9562s] error: Multiple top-level packages discovered in a flat-layout: ['top', 'CMakeFiles'].
[ 9562s] 
[ 9562s] To avoid accidental inclusion of unwanted files or directories,
[ 9562s] setuptools will not proceed with this build.
[ 9562s] 
[ 9562s] If you are trying to create a single distribution with multiple packages
[ 9562s] on purpose, you should not rely on automatic discovery.
[ 9562s] Instead, consider the following options:
[ 9562s] 
[ 9562s] 1. set up custom discovery (`find` directive with `include` or `exclude`)
[ 9562s] 2. use a `src-layout`
[ 9562s] 3. explicitly set `py_modules` or `packages` with a list of names
[ 9562s] 
[ 9562s] To find more information, look for "package discovery" on setuptools docs.

...

[ 9833s] RPM build errors:
[ 9833s]     File not found: /home/abuild/rpmbuild/BUILDROOT/ceph-16.2.9.158+gd93952c7eea-2.3.x86_64/usr/lib/python3.10/site-packages/cephfs_shell-*.egg-info
[ 9833s]     File not found: /home/abuild/rpmbuild/BUILDROOT/ceph-16.2.9.158+gd93952c7eea-2.3.x86_64/usr/bin/cephfs-shell

This has been fixed in Fedora downstream by moving a/src/tools/cephfs/cephfs-shell to a separate subdirectory (see https://src.fedoraproject.org/rpms/ceph/blob/rawhide/f/0021-cephfs-shell.patch). I've confirmed this approach also works for openSUSE.


Related issues 2 (0 open2 closed)

Copied to Ceph - Backport #56976: quincy: build: cephfs-shell fails to build/install with python setuptools >= v61 ResolvedTim SerongActions
Copied to Ceph - Backport #56977: pacific: build: cephfs-shell fails to build/install with python setuptools >= v61 ResolvedTim SerongActions
Actions #1

Updated by Tim Serong almost 2 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 47202
Actions #2

Updated by Kefu Chai over 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Backport Bot over 1 year ago

  • Copied to Backport #56976: quincy: build: cephfs-shell fails to build/install with python setuptools >= v61 added
Actions #4

Updated by Backport Bot over 1 year ago

  • Copied to Backport #56977: pacific: build: cephfs-shell fails to build/install with python setuptools >= v61 added
Actions #5

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #6

Updated by Tim Serong over 1 year ago

  • Status changed from Pending Backport to Resolved

Backports merged, closing.

Actions

Also available in: Atom PDF