How to install Python package from source on Windows
Rhodri James
rhodri at kynesim.co.uk
Wed May 17 08:35:33 EDT 2017
On 17/05/17 01:41, bartc wrote:
> On 17/05/2017 00:24, Chris Angelico wrote:
>> On Wed, May 17, 2017 at 9:01 AM, bartc <bc at freeuk.com> wrote:
>
>> You mean like wheel files? Yeah, whodathunk. They don't need a C
>> compiler or anything.
>
> I don't know if that's the same kind of thing. I'm not talking about
> something like a binary distribution or something that self-installs.
>
> I mean distributing actual source that needs to be built (so independent
> of platform or compiler), but without having to download a sprawling
> directory structure with thousands of files simply because that's the
> layout needed during development. It's sort of in-between the
> developer's sources, and a binary executable.
As a cross-platform developer, I find your naivity refreshing. If only
life were so simple.
When you develop code yourself, you can lay out your files however you
find most convenient, code to the foibles of your compiler, operating
system and indeed processor, and use whatever tools you choose. The
moment you expect anyone else to compile your code, all of those
conveniences go out of the window, and things become more complex, not
less. Arbitrary compilation environments require more support than
development, not less.
>>> What do you mean what /I/ support?
>>
>> Your programs. Anything you release. On how many of those combinations
>> do they work?
>
> I'm not talking about my programs for a change. (I mentioned my compiler
> as an example of one that is faster than tcc but not as fast as gcc.)
You should be. You are claiming something is easy. Chris invited you
to consider how easy it isn't for code you know well. That you keep
fighting shy of doing so does not speak well of you as a programmer.
>>> It should be a piece of cake, yes?
>>>
>>
>> Well, let's see. What C standard does TCC support? What standard
>> library does it provide? If it supports all of C99 and links against
>> (say) GNU libc, then it's probably going to be fairly straight-forward
>> to compile CPython. If it supports C99 but has its own libc, you might
>> have to detect features to find out what you can and can't do with
>> it... yaknow, how the configure script does. That's what it's for. And
>> if TCC doesn't support C99, you may have major hassles.
>
> OK. Now you understand what I meant that trying to compile CPython [with
> TCC] was complicated, in order to get an idea of what performance would
> be like.
Yes, it's complicated. That's the point: it *is* complicated. You seem
to think that it's been made complicated for you. It hasn't. The hard
work you had to put in to compile with TCC had to be put in by other
people for gcc, clang, MSVC, etc. That no one else put in the work for
TCC just indicates that no one else thought it was worth while.
--
Rhodri James *-* Kynesim Ltd
More information about the Python-list
mailing list