Deployment with cx_freeze?

113 views
Skip to first unread message

Dominik Schacht

unread,
Sep 21, 2014, 11:34:30 AM9/21/14
to pytho...@googlegroups.com
Hi guys,
I'm trying to create an executable of my doit using project with
cx_Freeze (Python 3.3) to allow easier windows deployment. The problem
I'm now encountering is that the resulting doit-executable crashes
with this stacktrace:

Traceback (most recent call last):
File "/home/dominik/coding/uristmap/lib/python3.3/site-packages/cx_Freeze/initscripts/Console.py",
line 27, in <module>
exec(code, m.__dict__)
File "../bin/doit", line 5, in <module>
File "/home/dominik/coding/uristmap/lib/python3.3/importlib/_bootstrap.py",
line 1565, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/home/dominik/coding/uristmap/lib/python3.3/importlib/_bootstrap.py",
line 1532, in _find_and_load_unlocked
loader.load_module(name)
File "/home/dominik/coding/uristmap/lib/python3.3/site-packages/pkg_resources.py",
line 3007, in <module>
working_set.require(__requires__)
File "/home/dominik/coding/uristmap/lib/python3.3/site-packages/pkg_resources.py",
line 728, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/dominik/coding/uristmap/lib/python3.3/site-packages/pkg_resources.py",
line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: doit==0.26.0

You can view the cx_setup.py file here: http://pastebin.com/1ZsERVrr .
I tried the genstandalone.py to create the doit executable but I only
get a file that does nothing at all from that script. Has anyone here
an idea how to properly handle this or a recommandation for a better
way?

Eduardo Schettino

unread,
Sep 21, 2014, 12:59:47 PM9/21/14
to python-doit
On Sun, Sep 21, 2014 at 11:08 PM, Dominik Schacht <domsc...@gmail.com> wrote:
Hi guys,
I'm trying to create an executable of my doit using project with
cx_Freeze (Python 3.3) to allow easier windows deployment. The problem
I'm now encountering is that the resulting doit-executable crashes
with this stacktrace:

Traceback (most recent call last):
  File "/home/dominik/coding/uristmap/lib/python3.3/site-packages/pkg_resources.py",
line 626, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: doit==0.26.0

You can view the cx_setup.py file here: http://pastebin.com/1ZsERVrr .

I am not familiar with cx_freeze. bin/doit is created by setuptools.
Not sure the 2 can work together... it seems to be a problem between them.
doit code didnt even started to be executed.
 
I tried the genstandalone.py to create the doit executable but I only
get a file that does nothing at all from that script. Has anyone here
an idea how to properly handle this or a recommandation for a better
way?
True. It looks like genstandalone is broken.
The genscript is actually from py.test, it seems there was some changes there...
I have no idea how to debug this. I will try to check later.

cheers,
  Eduardo

Dominik Schacht

unread,
Sep 21, 2014, 2:01:57 PM9/21/14
to python-doit
Thanks for your response, Eduardo. I tinkered around with it a bit
more and decided to go the easiest way and just work around that
problem. I copied the doit/__main__.py file into my workspace and now
use that as the executable for cx_Freeze. My early tests show that it
apparently works so I hope that's that.
> --
> You received this message because you are subscribed to the Google Groups
> "python-doit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python-doit...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages