473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

[ANN] pyKook 0.0.1 - a simple build tool similar to Make or Ant

Hi all,

I have released pyKook 0.0.1.
http://pypi.python.org/pypi/Kook/0.0.1
http://www.kuwata-lab.com/kook/
http://www.kuwata-lab.com/kook/pykook-users-guide.html

pyKook is a simple build tool similar to Make, Ant, Rake, or SCons.
pyKook regards software project as cooking.
Terms used in pyKook are cooking terms.
For example:

cookbook - Makefile
product - target file
ingredient - source file
recipe - how to create target from source
Cookbook (= Makefile) is written in pure Python.
You can write any statements or expressions in cookbook.
Example of cookbook (Kookbook.py):

--------------------------------------------------
##
## properties
##
cc = prop('cc', 'gcc')
cflags = prop('cflags', '-g -Wall')
##
## recipes
##
@ingreds("hello")
def task_all(c):
pass

@product("hello")
@ingreds("hello.o")
def file_command(c):
"""generates hello command"""
system(c%"$(cc) $(cflags) -o $(product) $(ingred)")

@product("*.o")
@ingreds("$(1).c", if_exists("$(1).h"))
def file_ext_o(c):
"""compile '*.c' and '*.h'"""
system(c%"$(cc) $(cflags) -c $(1).c")

def task_clean(c):
rm_f("*.o")
--------------------------------------------------
Exampe of result:

==================================================
shls
Kookbook.py hello.c hello.h

shpykook -l
Properties:
cc : 'gcc'
cflags : '-g -Wall'

Task recipes:
all : cook all products
clean : remove by-products

File recipes:
hello : generates hello command
*.o : compile '*.c' and '*.h'

(Tips: you can set 'kook_default_product' variable in your
kookbook.)

shpykook all # or, pykook --cc=gcc4 all
### *** hello.o (func=file_ext_o)
$ gcc -g -Wall -c hello.c
### ** hello (func=file_command)
$ gcc -g -Wall -o hello hello.o
### * all (func=task_all)
==================================================
See users-guide for more details.
http://www.kuwata-lab.com/kook/pykook-users-guide.html
Have fun!

--
regards,
makoto kuwata

Oct 19 '08 #1
0 962

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Hung Jung Lu | last post by:
Hi, Does anyone know whether there is any generic GUI-based build system around? (Python-based would be great. Also, for now I am only looking for Windows OS.) By "build system" I mean something...
0
by: Fuzzyman | last post by:
filestruct filestruct is both a command line tool and a library of functions (well - a couple of classes really). http://www.voidspace.org.uk/atlantibots/pythonutils.html#fsdm As a command...
8
by: ted | last post by:
How does the speed of the Scons build tool compare with Ant? Right now with out Ant builds take around an hour. Hoping to speed that up. TIA, Ted
4
by: Travis Stewart | last post by:
Hi, I am not very familiar with C++ so the problems I am having might be simple and I just cannot see them or I am totally unaware of why something would be incorrect. Anyway, I'm using the ANN...
51
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct...
18
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How...
0
by: YellowFin Announcements | last post by:
Security solutions provider EXTOL MSC Berhad has developed a neural network predictive analysis engine and is now working with Australian business intelligence company Yellowfin to develop a front...
14
by: Zed A. Shaw | last post by:
Hi Everyone, Just putting out an announcement that I've released a new version of Vellum numbered 0.16. This version should be ready for people to use as not much of the internal structure has...
6
by: Hussein B | last post by:
Hi. Apache Ant is the de facto building tool for Java (whether JSE, JEE and JME) application. With Ant you can do what ever you want: compile, generate docs, generate code, packing, deploy,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.