How to install Python package from source on Windows

bartc bc at freeuk.com
Tue May 16 20:41:16 EDT 2017


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.

>> 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.)

>> And it sounds like the CPython developers have never used a compiler other
>> than gcc or MSVC, and the latter only reluctantly.
>
> gcc, clang, msvc. That's three major compilers, at least one of which
> is available on every major platform in use today. And at least one of
> which is available on minor platforms too (gcc on OS/2, for instance,
> which Python used to support until recently).

In the CPython sources, there are references to GCC, clang, MSC (I 
assume MSVC) and (oddly) WATCOM.

>> 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.

-- 
bartc




More information about the Python-list mailing list