This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Craft is like Makefile, except everything is in native Python.

Install

pip install craft

Craft works on Python 2.7+ and Python 3.2+.

Crafty files

Craft will read attempt to read crafty.py in the current directory or the environment variable $CRAFTFILE.

An example crafty.py:

from craft import task, depends

@task
@depends('bar', 'foo')
def cake():
  """
  Prints cake, and depends on foo & bar
  to run first
  """
  print('Time for cake')

@task
def bar():
  """ Prints bar """
  print('bar')

@task
def foo():
  print("Hi,I'm foo")

@task
def auto():
  """
  I will run when you supply no arguments to "craft".
  """
  print("Auto - Doing my own thing. Which is 'foo' today.")
  foo()

@task
def setup():
  """
  I will run once on any call to "craft"
  """
  print("Hello good sir, I'm the setup routine.")

Usage

Running craft -h in the directory containing crafty.py will show the list of available tasks. Example:

usage: craft [-h] [task [task ...]]

positional arguments:
  task

optional arguments:
  -h, --help  show this help message and exit

Available tasks:

- cake: Prints cake, and depends on foo & bar to run first
- auto: I will run when you supply no arguments to "craft".
- setup: I will run once on any call to "craft"
- foo:
- bar: Prints bar

As you can see, the docstring for each @task function will then be represented in the help output, and docstrings can be omitted.

You can call individual tasks like:

craft foo

and run multiple tasks with one call like:

craft foo bar

History

v0.2.6 - 10 Nov 2012

  • Fix an issue with setup.py linking to the README

v0.2.3 - 14 Oct 2012

  • Fix error catching isolation from craft and the actual task

v0.2.0 - 27 Aug 2012

  • Added setup() and auto() tasks
  • Added support for task dependencies via @depends

v0.1.0 - 26 Aug 2012

Source is available at: https://github.com/jdpaton/craft

Release History

Release History

0.2.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
craft-0.2.6.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source Nov 11, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting