bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Python (win) stuff


From: Massimiliano Maini
Subject: Re: [Bug-gnubg] Python (win) stuff
Date: Thu, 3 Sep 2009 17:17:38 +0200

Actually I overestimated the impact on size, since the ziped python lib is 8Mb
because it's not compressed: once compressed it's much less.

Compared to a previuos install archive, the new one (with python 2.6.2 and
the whole python lib) is just 1Mb bigger and a lot comes from the python26.dll
being bigger than the 25 one (700Kb extra, uncompressed) and the 26 lib being
bigger than the 25 one.

Checking at instal time would be good, but could become a mess if the
installed python version changes wrt what gnubg has been compiled against.

I'm for having the installer to be sefl contained, even if tit wastes a few MBs
(download and disk space). Anyway, you won't need to download the full istaller
every day as soon as we reacha stable version: downloading the (most recent)
exes and slammng them into the directory will do the job.

MaX.

2009/9/3 Jonathan Kinsey <address@hidden>:
> Personally I think the smaller the install the better. In this case for
> instance I would say the majority of people don't use Python.
>
> In an ideal world maybe a more intelligent install/download program which
> checks
> to see what is already on the machine and only downloads what is required
> would
> be good.
>
> Or perhaps an automatic update facility built into gnubg, that sounds cool
> too...
>
> Jon
>
> Massimiliano Maini wrote:
>> Hi Christian,
>>
>> I've been reading around a bit on how to provide the entire Python
>> library when you embed
>> python into an appication.
>>
>> Today, I manually put (some) .py files into PythonLib dir in gnubg's
>> installation dir.
>> I verified that if instead of doing this, all the files are zipped
>> into a python25.zip, it works
>> (python25.zip is automagically added to the python path).
>>
>> I did 3 tests:
>>
>> 1. No python installed on the PC (actually I just renamed the
>> directory, maybe that's not
>> enough), needed .py files into gnubg's PythonLib dir: this works fine,
>> it's what I do today
>> for the distribs.
>>
>> 2. No gnubg's PythonLib directory, needed .pyc files into
>> python25.zip: this works fine, but
>> I get an error/warnig at startup of CLI: 'import site' failed; use -v
>> for traceback'. Everyhting
>> else works.
>>
>> 3. Python installed on the PC, no python25.zip, no gnubg's PythonLib
>> dir: this works fine,
>> but with the same problem as 2 (the import site warning).
>>
>> I've found this about embedding:
>>
>>
>> http://stackoverflow.com/questions/551227/deploying-application-with-python-or-another-embedded-scripting-language
>>
>> It states that we should use:
>>
>> Py_NoSiteFlag = 1; // Disable importing site.py
>> Py_Initialize(); // Create a python interpreter
>>
>> This would probably solve the above issue.
>>
>> I was also thinking about the entire PythonLib thing: this directory
>> seems to be Win
>> specific (gnubgmodule.c, 2322). If I put the python lib into the zip,
>> the directory is no
>> longer needed. Maybe we can just remove this part.
>>
>> MaX.
>>
>> P.S.
>> The entire python lib is roughly 6Mb. I think I can just put it in the
>> Win distrib, no big
>> deal if we move from 20Mb to 26mb. OK ?
>> I would say it's better to provide .pyc files, so that we don't run in
>> any "write permission'
>> issue under Vista (even if it would likely work anyway).
>>
>>
>> _______________________________________________
>> Bug-gnubg mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/bug-gnubg
>>
>>
>
>
>
>
> ________________________________
> Have more than one Hotmail account? Link them together to easily access
> both.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]