473,789 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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) :
"""generate s 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_p roduct' 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_comm and)
$ 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 988

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

Similar topics

10
3208
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 similar the "make/makefile" system, but somewhat more generic/powerful/flexible/higher-level/etc, so that if you have a sequence (maybe even some simple conditional branches and loops) of system tasks to perform, you can more easily visualize...
0
1178
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 line tool it will do 'remote-directory syncs'. It will profile a directory, then reprofile and record all changes into a single zip file. It can then use that zip file to make the same set of
8
2592
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
3869
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 approximate nearest neighbour libraries written by David Mount and Sunil Arya. In the ANN.h file there is a comment describing how the data types used to represent the coordinates and distances between points can be modified by the user. For my...
51
8297
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 code? many thx!
18
3043
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
1666
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 end that is integrated with Yellowfin's reporting, that can be delivered to clients. Under the tie up, Yellowfin will make the new engine called "Artificial Neural Networks" (ANN) available with its business intelligence solution for local and...
14
1157
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 changed in a great many commits and it contains all the latest bug fixes. It also has the beginning of an extensive PDF document describing how to use it. This is still an in-progress work, so it has grammar mistakes and spelling errors, but...
6
1785
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, connecting to remote servers and every thing. Do we have such a tool for Python projects? Thank you.
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9506
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10193
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.