Project

General

Profile

Actions

Bug #63591

open

mgr/dashboard: pyyaml==6.0 installation fails with "AttributeError: cython_sources"

Added by Brad Hubbard 6 months ago. Updated 2 months ago.

Status:
Fix Under Review
Priority:
High
Assignee:
Category:
Build, CI, Dependencies & Tools
Target version:
-
% Done:

0%

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

Description

Description of problem

pyyaml==6.0 installation fails with "AttributeError: cython_sources" and is an instance of https://github.com/yaml/pyyaml/issues/601

Environment

  • ceph version string: v18.0.0-7432-g329e2a1e046
  • Platform (OS/distro/release): Fedora 39
  • Cluster details (nodes, monitors, OSDs): N/A
  • Did it happen on a stable environment or after a migration/upgrade?: N/A
  • Browser used (e.g.: Version 86.0.4240.198 (Official Build) (64-bit)): N/A

How reproducible

100%

Steps:

Create a new fedora 39 environment and run install-deps.sh

Actual results

+ pip --timeout 300 --exists-action i wheel -w wheelhouse-wip -r requirements-alerts.txt -r requirements-grafonnet.txt -r requirements-lint.txt                                                                                             
Collecting pyyaml==6.0 (from -r requirements-alerts.txt (line 1))                                                                                                                                                                           
  Downloading PyYAML-6.0.tar.gz (124 kB)                                                                                                                                                                                                    
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 252.3 kB/s eta 0:00:00                                                                                                                                                         
  Installing build dependencies ... done                                                                                                                                                                                                    
  Getting requirements to build wheel ... error
...
        File "/tmp/pip-build-env-t3m5whfk/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__                                                                                                      
          raise AttributeError(attr)                                                                                                                                                                                                        
      AttributeError: cython_sources                                                                                                                                                                                                        
      [end of output]                                                                                                                                                                                                                       

  note: This error originates from a subprocess, and is likely not a problem with pip.                                
error: subprocess-exited-with-error 

Expected results

Successful completion of install-deps.sh

Additional info

The following patch resolves the failure in install-deps.sh and allows it to complete but has not been validated in any other way.

diff --git a/install-deps.sh b/install-deps.sh
index d01bc6464e6..1d6ba5b8cbf 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -304,7 +304,8 @@ function populate_wheelhouse() {
     pip $PIP_OPTS $install \
       'setuptools >= 0.8' 'pip >= 21.0' 'wheel >= 0.24' 'tox >= 2.9.1' || return 1
     if test $# != 0 ; then
-        pip $PIP_OPTS $install $@ || return 1
+        echo "cython<3" > /tmp/constraint.txt
+        PIP_CONSTRAINT=/tmp/constraint.txt pip $PIP_OPTS $install $@ || return 1
     fi
 }


Related issues 1 (0 open1 closed)

Has duplicate Ceph - Bug #63603: install-deps.sh fails with 'AttributeError: cython_sources'Duplicate

Actions
Actions

Also available in: Atom PDF