Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily restrict setuptools to <= 73.0
CFFI is currently broken with setuptools 74.0, see python-cffi/cffi#118
- Loading branch information
998f4e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really fixing the cffi issue with the msvc9compiler being removed from distutils? I ask because my Python app in its
requirements.txt
specifiessetuptools==70.0.0
yet my build has been broken by this issue.Apologies for a slightly off-topic comment. I'm not sure where else to ask this.
998f4e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I figured it out. My app is also requiring cffi and cffi must be requiring setuptools. I guess I'll have to wait for the cffi fix.
998f4e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this fixes the build in our case. Our setup of CFFI corresponds to the API mode, i.e., we use CFFI to compile a Python module. At runtime, we only need to load that module and do not require CFFI. It seems like the only issue was that CFFI loads the legacy
distutils.msvc9compiler
module, which is provided by setuptools ≤ 73.0.I’m a bit puzzled by that. If your
requirements.txt
specifiessetuptools==70.0.0
, shouldn’t CFFI load thedistutils
module of that setuptools version at runtime then? Or is the issue you face at runtime different fromModuleNotFoundError: No module named 'distutils.msvc9compiler'
?No worries, you’re welcome 🙂
998f4e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no Python expert and did not write our Python interface. Yes I am seeing the error you mention. I will have to investigate further into how
cffi
is used. Tomorrow or Monday. It is late here now.