> On Jan 1, 2015, at 2:52 PM, Sébastien de Menten <sdemen...@gmail.com> wrote:
> 
> Hello John,
> 
> I went to explore a bit this path to see its feasibility.
> 
> I came with a concrete example of the idea with this single exe 
> (https://github.com/sdementen/piecash/blob/master/piecash_interpreter/piecash_interpreter.exe?raw=true)
>  generated by pyinstaller that takes as argument a python file (and any extra 
> argument) and run it through python 2.7. 
> 
> In this example exe, the piecash module is included so that the 
> piecash_ledger script 
> (https://github.com/sdementen/piecash/blob/master/piecash_interpreter/piecash_interpreter.exe?raw=true)
>  can be run with:
> 
> piecash_interpreter.exe piecash_ledger.py mybook.gnucash
> 
> Could this be also an option for the official python bindings to ease their 
> installation on windows (and maybe OS X but I have not OS X machine...) ? And 
> as possible interface with gnucash and the official python bindings (or any 
> other bindgins/python executable like piecash ;-) )
> 
> sebastien
> 
> On Sun, Dec 28, 2014 at 3:59 PM, John Ralls <jra...@ceridwen.us> wrote:
> 
> > On Dec 27, 2014, at 11:54 PM, Sébastien de Menten <sdemen...@gmail.com> 
> > wrote:
> >
> > Just a thought regarding the need for a python distribution for the python
> > binding on Windows/OS X, would it be an option to build a single executable
> > with the gnucash bindings (see http://www.orbitals.com/programs/pyexe.html
> > or http://www.decalage.info/en/python/py2exe) ?
> > This would give a complete control on the required python version/package
> > distribution.
> 
> Those solutions are for distributing single applications written in Python. 
> They wouldn't do any good for python bindings, where the user supplies code. 
> For that we'd have to bundle the entire Python distribution. Because of the 
> constraints of linking to a particular libpython on OSX -- the interpreter 
> and bindings must link to the same libpython, and different versions of OSX 
> provide different versions of python, were in the same boat there. We'd need 
> to distribute a complete Python installation in the GnuCash bundle, and 
> generally users would have to use the python interpreter we would ship.
> 
> >
> > And if the user is more knowledgeable re python, it could go with its own
> > distribution (+ other relevant comment in this thread)
> 
> That would require somehow coercing the packages shipped with GnuCash to link 
> the library that the interpreter is using. That's not something the typical 
> Python programmer thinks much about.

No. The python bindings are part of GnuCash, and GnuCash isn’t a python 
program, so neither pyexe nor py2exe will work.
They work with piecash because it’s pure python.

Regards,
John Ralls


_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to