98

Rake is a software build tool written in Ruby (like Ant or Make), and so all its files are written in this language. Does something like this exist in Python?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Bite code
  • 578,959
  • 113
  • 301
  • 329
  • 3
    Are you looking for a general dependency resolution and build tool, like make, which can build projects from any language? Or something to build python packages specifically? – Ian Clelland Sep 10 '09 at 21:34
  • 1
    Something general. Building Python package is interesting, but can be performed with general tools. – Bite code Sep 10 '09 at 22:50
  • 2
    also see: http://stackoverflow.com/questions/542289/are-there-any-good-build-frameworks-written-in-python – Ray Mar 14 '10 at 07:31
  • 1
    also see http://farmdev.com/thoughts/46/the-python-make-tool/ – jassinm Jul 07 '11 at 13:44
  • 6
    Did anyone came here from Joe Armstrong slide? https://youtu.be/lKXe3HUG2l4?t=1270 – nephewtom Oct 19 '16 at 11:43
  • 1
    Wondering what are current opinions on Paver vs Invoke vs Doit https://pydoit.org/ ... the main contenders that are still active, and mentioned in answers below? Is there a good comparison somewhere out there? – inger Nov 11 '20 at 18:20

9 Answers9

41

InvokeFabric without the SSH dependencies.

The Fabric roadmap discusses that Fabric 1.x will be split into three portions:

  1. Invoke — The non-SSH task execution.
  2. Fabric 2.x — The remote execution and deployment library that utilizes Invoke.
  3. Patchwork — The "common deployment/sysadmin operations, built on Fabric."

Invoke is a Python (2.6+ and 3.3+) task execution tool & library, drawing inspiration from various sources to arrive at a powerful & clean feature set.

Below are a few descriptive statements from Invoke's website:

  • Invoke is a Python (2.6+ and 3.3+) task execution tool & library, drawing inspiration from various sources to arrive at a powerful & clean feature set.
  • Like Ruby’s Rake tool and Invoke’s own predecessor Fabric 1.x, it provides a clean, high level API for running shell commands and defining/organizing task functions from a tasks.py file.
Community
  • 1
  • 1
Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
  • 1
    @IgorZevaka now it works on windows, the same topic - github.com/pyinvoke/invoke/pull/119 – Roman M. Koss Jun 14 '15 at 17:51
  • 1
    Was Shovel user some 4 years ago. Definitely go with Invoke now. Very cool command-line interface, task declaration is nice and easy, chaining feels like Make's. Nice. – ddotsenko Mar 24 '20 at 02:49
  • Any opinions on Paver (mentioned in other answers on this Q), vs Invoke? are they direct "competitors"? Pros/Cons? – inger Nov 11 '20 at 16:39
28

Paver has a similar set of goals, though I don't really know how it compares.

MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
Ned Batchelder
  • 364,293
  • 75
  • 561
  • 662
14

Shovel seems promising:

Shovel — Rake for Python

https://github.com/seomoz/shovel

Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
Gian Marco
  • 22,140
  • 8
  • 55
  • 44
6

Waf is a Python-based framework for configuring, compiling and installing applications. It derives from the concepts of other build tools such as Scons, Autotools, CMake or Ant.

las3rjock
  • 8,612
  • 1
  • 31
  • 33
5

There is also doit - I came across it while looking for these things a while ago, though I didn't get very far with evaluating it.

Hamish Downer
  • 16,603
  • 16
  • 90
  • 84
5

Although it is more commonly used for deployment, Fabric might be interesting for this use case.

sorin
  • 161,544
  • 178
  • 535
  • 806
charlax
  • 25,125
  • 19
  • 60
  • 71
0

Also check out buildout, which isn't so much a make system for software, as a make system for a deployment.

http://pypi.python.org/pypi/pysqlite/2.5.5

So it's not a direct rake equivalent, but may be a better match for what you want to do, or a really lousy one.

Lennart Regebro
  • 167,292
  • 41
  • 224
  • 251
  • 1
    Using buildout for that is like jusing a tank to go to the mall, isn't it ? Using any Zope / Plone tools outside Zope / Plone generally is, anyway :-p – Bite code Sep 10 '09 at 22:52
  • "For that"? He didn't specify what he wanted to use it for. Anyway, buildout is not a Zope/Plone tool. It is also not big or complex. It's really quote tiring that some people will dismiss tool only because it's written by or used by Zope developers. That attitude it pretty daft. – Lennart Regebro Sep 11 '09 at 06:45
  • Come on, that was just teasing. I used to work for a Plone-only company and yes, we use to make a lot of jokes about the tools we were using. That's a sane attitude, don't you think ? – Bite code Sep 11 '09 at 11:10
0

There is Phantom in Boo (which isn't Python, but nearly).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Wernight
  • 36,122
  • 25
  • 118
  • 131
-2

I would check out distutils:

The distutils package provides support for building and installing additional modules into a Python installation. The new modules may be either 100%-pure Python, or may be extension modules written in C, or may be collections of Python packages which include modules coded in both Python and C.

ire_and_curses
  • 68,372
  • 23
  • 116
  • 141
Andrew Hare
  • 344,730
  • 71
  • 640
  • 635