Using Makefiles in Python projects

Skip Montanaro skip.montanaro at gmail.com
Thu Nov 7 17:07:28 EST 2019


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. Every Makefile should
have "test", "lint" and "clean" targets (where they make sense) in
addition to something equating to "all" (the first target in the
file). In short, if you have to type a command more than once, you
need a Makefile. It will save you time and serve as documentation to
yourself and others about how the various pieces of your project fit
together.

Skip


More information about the Python-list mailing list