Building CPython

Dave Angel davea at davea.name
Thu May 14 13:10:54 EDT 2015


On 05/14/2015 01:02 PM, BartC wrote:
> On 14/05/2015 17:09, Chris Angelico wrote:
>> On Fri, May 15, 2015 at 1:51 AM, BartC <bc at freeuk.com> wrote:
>>> OK, the answer seems to be No then - you can't just trivially compile
>>> the C
>>> modules that comprise the sources with the nearest compiler to hand.
>>> So much
>>> for C's famous portability!
>>>
>>> (Actually, I think you already lost me on your first line.)
>
>> If you want to just quickly play around with CPython's sources, I
>> would strongly recommend getting yourself a Linux box. Either spin up
>> some actual hardware with actual Linux, or grab a virtualization
>> engine like VMWare, VirtualBox, etc, etc, and installing into a VM.
>> With a Debian-based Linux (Debian, Ubuntu, Mint, etc), you should
>> simply be able to:
>>
>> sudo apt-get build-dep python3
>
> Actually I had VirtualBox with Ubuntu, but I don't know my way around
> Linux and preferred doing things under Windows (and with all my own tools).
>
> But it's now building under Ubuntu.
>
> (Well, I'm not sure what it's doing exactly; the instructions said type
> make, then make test, then make install, and it's still doing make test.
>
> I hope there's a quicker way of re-building an executable after a minor
> source file change, otherwise doing any sort of development is going to
> be impractical.)
>

That's what make is good for.  It compares the datestamps of the source 
files against the obj files (etc.) and recompiles only when the source 
is newer.  (It's more complex, but that's the idea)

-- 
DaveA



More information about the Python-list mailing list