[Clam-devel] Re: Task Runner removed?
David García Garzón
dgarcia at iua.upf.edu
Sun Aug 17 22:48:03 PDT 2008
Of course we need the dependencies. That's why we look and freeze and py2exe.
Indeed Annotator SConstruct calls py2exe in windows but i think i disabled it
as i was unable to use py2exe in a crosscompiling environment but it was
working when we had the windows machine, so is not that work left. I just
recall that it was not that clean the way to achieve that: tracking a lot of
missing py modules to enable or disable to get it working.
Not including the modules in the binary, requires python installed and if you
have python installed two easier solution such as a .bat file or a .py file
can be taken. Indeed i guess that the main problem is that extractor scripts
have the .py extension removed and windows doesn''t recognize them as
On Diumenge 17 Agost 2008, Hernán Ordiales wrote:
> On Sun, Aug 17, 2008 at 12:52 PM, David García Garzón
> <dgarcia at iua.upf.edu> wrote:
> > Py2exe is something we should aboard some time soon to enable python
> > scripts execution in windows, as we need either installing Python from
> > the Annotator installer or generating executables from the python
> > scripts.
> > There is a python script 'freeze.py' that comes with the regular python
> > distribution that generates c sources that compile a python script as a
> > binary application. We could try that or py2exe.
> py2exe is useful to build distribution files since looks for all the
> dependencies and automates the process but make an executable from a
> python file is so easy like:
> #include <stdio.h>
> #include <python2.5/Python.h>
> int main(int argc, char *argv)
> PySys_SetArgv(argc, argv);
> FILE *f;
> f = fopen("YourPythonScript.py", "r");
> PyRun_SimpleFile(f, "YourPythonScript.py");
> return 0;
> And then:
> gcc main.c -o YourBinaryFile -lpython2.5
> or with scons:
> import os
> env = Environment(ENV=os.environ)
> env.Append( LIBS=['python2.5'] )
> Program('main.c', LIBS=['python2.5'] )
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the clam-devel