Using Makefiles in Python projects

Marko Rauhamaa marko at pacujo.net
Fri Nov 8 03:49:58 EST 2019


Skip Montanaro <skip.montanaro at gmail.com>:

> On Thu, Nov 7, 2019 at 1:24 PM Vitaly Potyarkin <sio.wtf at gmail.com> wrote:
>>
>> What do you think of using Makefiles for automating common chores in
>> Python projects? Like linting, type checking and testing?
>
> Kinda unsure why this needs to be asked (says the guy who's used Make
> longer than Python and nearly as long as Emacs). :-) That said, I will
> answer in the affirmative. Make is a great tool.

I can't agree that make is a great tool. It's a tool a slight step
better than unconditional build scripts, but it's really only suitable
for projects involving a single directory (although baffling heroics
have been achieved using GNU Make in particular).

Of the more modern build systems, I have found SCons to be the best. It
has a killer feature not found elsewhere: dependency checks are based on
content, not timestamps. That way going back in time (which is very
common in everyday development) won't confuse build dependencies. We
have considered other advanced competitors to SCons, but the
content-based type-checking feature is something I wouldn't give up.

(If SCons developers are reading, thanks for your insight and efforts.
SCons has gotten so many things right with very few blind spots. I've
been a happy user since 2003.)


Marko


More information about the Python-list mailing list