recommended strategy for missing development tools
![](https://secure.gravatar.com/avatar/6ad1811de8100dc2f561d597023c8542.jpg?s=120&d=mm&r=g)
A reportlab user says his pip install fails to create an importable C extension. He said "The platform is Mac OS X 10.11.6, aka "El Capitan". Pip didn't complain" which is probably true since the extension is not required for reportlab's main usage. I tried to reproduce on OS X 10.10.5, but my machine has xcode installed and the extension was correctly produced. I don't have any code in setup.py to prevent compilation; is there a way to alert users to the non-build of the extension(s). -- Robin Becker
![](https://secure.gravatar.com/avatar/97c543aca1ac7bbcfb5279d0300c8330.jpg?s=120&d=mm&r=g)
On Tue, Jan 24, 2017 at 3:09 AM, Robin Becker <robin@reportlab.com> wrote:
A reportlab user says his pip install fails to create an importable C extension. He said
"The platform is Mac OS X 10.11.6, aka "El Capitan". Pip didn't complain"
which is probably true since the extension is not required for reportlab's main usage.
I tried to reproduce on OS X 10.10.5, but my machine has xcode installed and the extension was correctly produced.
I don't have any code in setup.py to prevent compilation; is there a way to alert users to the non-build of the extension(s).
I'm having some trouble figuring out exactly what you're asking... is the question: "if my setup.py encounters a non-fatal error while being run by pip, how can I print a message for the user to see while still letting the build continue?"? -n -- Nathaniel J. Smith -- https://vorpus.org
![](https://secure.gravatar.com/avatar/6ad1811de8100dc2f561d597023c8542.jpg?s=120&d=mm&r=g)
On 24/01/2017 11:13, Nathaniel Smith wrote:
On Tue, Jan 24, 2017 at 3:09 AM, Robin Becker <robin@reportlab.com> wrote:
A reportlab user says his pip install fails to create an importable C extension. He said
"The platform is Mac OS X 10.11.6, aka "El Capitan". Pip didn't complain"
which is probably true since the extension is not required for reportlab's main usage.
I tried to reproduce on OS X 10.10.5, but my machine has xcode installed and the extension was correctly produced.
I don't have any code in setup.py to prevent compilation; is there a way to alert users to the non-build of the extension(s).
I'm having some trouble figuring out exactly what you're asking... is the question: "if my setup.py encounters a non-fatal error while being run by pip, how can I print a message for the user to see while still letting the build continue?"?
-n
Sorry to be so vague, but I am not the person who ran pip install so I'm not exactly sure what happened. The setup.py in question complains if the extension files cannot be found, but does not error. If the files can be found and I assume they can because they're now part of the same repository then the extensions are set up and added to the final setup call. Since pip did not complain I assume either the setup.py failed to find the extension source or the compile failed silently somehow. Unfortunately I don't have a test system where I can turn off xcode to see what happens. I'm wondering if setup fails silently somehow. -- Robin Becker
![](https://secure.gravatar.com/avatar/90a3b7816edd170b002641ade072b52a.jpg?s=120&d=mm&r=g)
On Wed, Jan 25, 2017, at 10:23 AM, Robin Becker wrote:
The setup.py in question complains if the extension files cannot be found, but does not error.
There was a change in pip at some point which means that it only shows the output from setup.py if running it fails (i.e. it has a non-zero exit status). I think this was largely because setup.py output is much more verbose than you usually want, especially if pip installs many packages at once. It's nice in some cases where setup.py displays warnings that aren't really a problem. In one project I maintain, a particular submodule requires Python 3, while the rest of the code can be used on Python 2 as well; people with older versions of pip have complained that it 'fails to install', which it doesn't, because the warning looks like a fatal error. However, the flip side of this is that, as far as I know, setup.py has to choose between succeeding silently, or failing and showing the user an error message. Thomas
participants (3)
-
Nathaniel Smith
-
Robin Becker
-
Thomas Kluyver