Archive for August, 2006

scons signatures for Python actions

Thursday, August 24th, 2006

Finally, I traced out why time-to-time my functional tests stop passing.
* Some steps are associated with Python functions.
* Signatures of such steps depend on the code of the functions.
* If the code of a function is changed, the signature is changes, and the step is considered out-of-date.
Therefore, small changes in code lead to changes in the build process.


forcing python mode in vim

Wednesday, August 23rd, 2006

To force the python mode for a file, add the following comment at the beginning:

# -*- mode: python -*-

It’s also possible to add other options as well. Unfortunately, I don’t remember the term for such comment, so I can’t find its descrition in the vim documentation.

consodoc does work

Saturday, August 19th, 2006

Recently Consodoc has passed refactoring and all the unit and functional tests. Now I’ve tried it in the real life.


currently executing python file

Wednesday, August 16th, 2006

Here is a way to get the currently executing Python file:

print (lambda x:x).func_code.co_filename


fixing build signatures

Saturday, August 12th, 2006

I have a lot of functional tests for my build process. Recently I changed the program name on one of the intermediate steps. As result, SCons
* thinks the build signatures are updated, and
* wants to rebuild starting from that step instead of doing the expected rebuilds.
Therefore, I have to update the most part of the tests. But it’s near to impossible to update manually.


parsing latex log files

Thursday, August 10th, 2006

In mary cases, LaTeX should be run several times to get the correct result (for example, to resolve cross-references). The only way to detect if re-run is required is to analyze the log file. I haven’t found anything ready to use, so I’ve written it myself.


consodoc milestone

Sunday, August 6th, 2006

Finally, all the functional tests (at the moment, 34) for consodoc are written and passed. The rest is easy: walk through FIXME file and make refactoring, create distro, create site and publish an announce. The middle of August is reasonable estimation for the first release.

discrimination of the europeans

Saturday, August 5th, 2006

Recently I got a complaint from an european user who wanted to buy bbAntiSpam. He was unpleasantly surprised that the actual price was two times more than the declared price.


scons: derived but source files

Saturday, August 5th, 2006

My build process consists of several steps. One of the intermediate files is actually intended to be edited by the user. But I noticed that when user changes the file, SCons doesn’t re-generate the rest of the build chain.


python trap

Wednesday, August 2nd, 2006

What will this code print?

for item in ('aaa'): print item


one month delay

Tuesday, August 1st, 2006

Consodoc project is now one month delay, and I expect I can’t release anything before the end of August. Functional testing revealed a lot of problems, some of them are important. Anyway, I’m glad with the current results.