Discussion:
building a windows distribution
Jev
2012-01-01 16:34:49 UTC
Permalink
Hi,

I have tried to follow the example from http://packages.python.org/guiqwt/disthelpers.html
, but it seems that the documentation has gotten out of date.
Current code does not contain 'remove_build_dist' etc functions
(import fails), but rather a single Distribution class.
Could you please show how to use these tools?

Thanks,
Jev
Pierre Raybaut
2012-01-01 18:26:27 UTC
Permalink
Hi,

Please upgrade guidata to v1.4.0+ (which has introduced the
disthelpers.Distribution class). It includes an example and docstrings
are quite self-explanatory.

Of course, do not hesitate to ask here again if you have any question.

Cheers
Pierre
Post by Jev
Hi,
I have tried to follow the example from http://packages.python.org/guiqwt/disthelpers.html
, but it seems that the documentation has gotten out of date.
Current code does not contain 'remove_build_dist' etc functions
(import fails), but rather a single Distribution class.
Could you please show how to use these tools?
Thanks,
Jev
Jev
2012-01-02 20:03:54 UTC
Permalink
Pierre, thanks for the quick reply.
My version is 1.4 and I've found an example in guidata/tests/
disthelpers.py

Distribution seems like a very handy class and it seems to work with
cx_Freeze...BUT...
after I changed the build setting to dist.build('py2exe') , the
example code fails on line 125 in /py2exe/build_exe.py
because r_filename appears to be None.

Having pretty hard time trying to figure out how this happens :(
Hope you can help.
---------- build_exe.py ------------------------

def validate(self):
resources = getattr(self, "bitmap_resources", []) + \
getattr(self, "icon_resources", [])
for r_id, r_filename in resources:
if type(r_id) != type(0):
raise DistutilsOptionError, "Resource ID must be an
integer"
125----> if not os.path.isfile(r_filename):
raise DistutilsOptionError, "Resource filename '%s'
does not exist" % r_filename
--------------------------

This is what we have before the exception is thrown by the
os.path.isfile
resources = [(0, None)]
r_filename = None
Jev
2012-01-02 23:14:18 UTC
Permalink
...after a couple more hours of playing with Distrubution (trying it
out on different code blocks) class I was able to build something with
it... Still, it often fails, especially in case of matplotlib include.

I think that I'll just have to write my own distribution 'helper'.
Distribution class is still a good example code to start with. Thanks
for that.

-Jev
Joschka
2012-08-22 14:25:16 UTC
Permalink
Hi,

I know this thread is a bit old, but I ran into the same issue today and
found the old functions in the python(x,y) repo:
http://code.google.com/p/pythonxy/source/browse/src/python/guidata/PURELIB/guidata/disthelpers.py?r=c1a183f4238b18ce4da70a6853b9277b32b6a55a
Using this module I was able to follow the instructions on
http://packages.python.org/guiqwt/disthelpers.html and got a working
distributable.

HTH

Joschka

Continue reading on narkive:
Loading...