[Distutils] wheels on sys.path clarification (reboot)

Evgeny Sazhin eugene at sazhin.us
Thu Jan 30 21:10:29 CET 2014

On Thu, Jan 30, 2014 at 2:52 PM, Brett Cannon <brett at python.org> wrote:

>> >> still far from seeing good reasoning. Please, correct me, but so far i
>> >> saw 2:
>> >>
>> >> 1. It is impossible to load C extensions
>> >> 2. Error handling is bad
>> >>
>> >> None of these reasons seems to be good enough to lead to a conclusion
>> >> that wheel used as jar-like thing is not needed. Here is how i see it
>> >> (again probably to my lack of knowledge):
>> >>
>> >> 1. Yes there is a group of "elite" interesting projects that are using
>> >> C extensions together with python code. What i don't understand is why
>> >> are wheels supposed to be tailored to the needs of the hybrid projects
>> >> instead of making pure python first priority? There is big crowd using
>> >> C extensions, but how much bigger is the crowd who doesn't? Why law
>> >> abiding pure python developer should jump through the hoops?
>> >
>> > Because C extensions are not "elite", they are pretty common. It's
>> > somewhat
>> > rare in my experience to see a non trivial project that doesn't have a C
>> > extension somewhere in it.
>> Isn't this a self contradictory statement? C extensions are quite
>> common for non-trivial project. non-trivial is not common.
>> Doesn't it mean that C extensions are rarely used for common trivial
>> stuff? You also implying that there were non-trivial projects that
>> didn't need C extensions. Or are you trying to make an argument that
>> the overall majority of python projects have C extensions?
> He's trying to argue that enough projects use C extensions that to have
> special support for projects that don't use them is supporting a special
> case. The Zen of Python says "Special cases aren't special enough to break
> the rules" and explicitly having wheels support direct execution only when
> they contain pure Python is supporting a special case. Obviously you can
> argue over at what point something stops being a "special case", but
> considering venvs isolate code well and are the officially supported way to
> isolate code then that makes stuff that goes passed what venv can do a
> special case.

yes, you got it absolutely right - I'm coming from the point of view
that the C extension is a special case. It's even called extension!
And pure python is never special case, therefore should take priority.

>> Is python
>> such a bad language it cannot deal with simple stuff without C being
>> involved?
> The use of a C extension does not necessarily mean a shortcoming of Python.
> People can write performance-critical code in C so as to get that last bit
> of speed in heavily executed code in a tight loop, etc. It has nothing to do
> with Python not being able to handle something and more that C code can
> simply be faster when coded correctly; it's a feature and not a band-aid.
> -Brett

I understand that,  i was sarcastic;) But thank you!


More information about the Distutils-SIG mailing list