Closed Jerhaad closed 7 years ago
Can you download the zip file from:
and unpack it.
Edit the setup.py
file and add an extra except
clause at end saying:
except Exception as e:
print(e)
raise
That will allow me to see what exception type is actually being raised instead of expected BuildExtFailed
.
Then package back into zip file and do:
pip install file.zip
or instead simply try:
pip install .
I tried it on another machine and it worked as expected. I'll try to reproduce the issue on the original machine.
Here you go. I should have posted this information originally, but I figured it would all be in the pip log.
I think what we're seeing is an OSError for file not found. Perhaps wrapt/_wrappers.c? Installing via setup.py directly worked as expected again. That makes me think this is an sdist vs. bdist issue.
Perhaps. I should probably have asked you to also include:
print(type(e))
I already have IOError
in list to look for, but not OSError
.
if sys.platform == 'win32':
build_ext_errors = (CCompilerError, DistutilsExecError,
DistutilsPlatformError, IOError)
else:
build_ext_errors = (CCompilerError, DistutilsExecError,
DistutilsPlatformError)
class BuildExtFailed(Exception):
pass
class optional_build_ext(build_ext):
def run(self):
try:
build_ext.run(self)
except DistutilsPlatformError:
raise BuildExtFailed()
def build_extension(self, ext):
try:
build_ext.build_extension(self, ext)
except build_ext_errors:
raise BuildExtFailed()
Closing this. A version was released that already checked for OSError. If still occurs, need to know the specific type.
A simple
pip install wrapt
can fail because of missing complier. Installing from source setup.py works fine.PIP log attached. wrapt_fail.txt