Wrap crossbar and a dedicated python runtime in a single executable using py2exe?

#1

Hello,

I would like to install and run a wamp server on a embedded windows 7 computer in a local network. The computer that should run the server does not have python installed by default and I would like to keep the setup as simple as possible.

To do this I would like to try if for example py2exe is able to wrap crossbar and a dedicated python runtime in a single executable. According to their website: “py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.” this might be possible.

To get it working, I should first be able to run crossbar in the console using “python [probably an argument]” (so not the command to install crossbar or to start it after installation).

Is this possible to execute crossbar from the sources? And if so, what command should I use?

Also, is there any reason why it would be impossible to wrap crossbar like that? (if it is certain to fail I would be wasting my time)

Kind regards, Nico

0 Likes

#2

Hi Nico,

you can start Crossbar.io like this (but this is unsupported / may change any time), eg from a checked out copy from GitHub

PYTHONPATH=. python -m crossbar.controller.cli version

Rgd wrapping using py2exe: this will be hard. Crossbar.io nowerdays has a couple of some binary dependencies (like eg PyNaCl).

Looong ago, I once got it working using

http://www.pyinstaller.org/

Non-trivial, and Windows specific problems everywhere.

Then there is

http://cx-freeze.readthedocs.io/en/latest/

There are also like half a dozen tools that claim to produce Windows MSI/Exe _installers_

Here are some hints:

http://stackoverflow.com/questions/10535088/creating-a-windows-installer-for-python-a-set-of-dependencies

Quickly glancing over the options for creating installers, I'd try this:

http://nsis.sourceforge.net
https://pypi.python.org/pypi/pynsist

Cheers,
/Tobias

···

Am 11.08.2016 um 12:32 schrieb nico....@gmail.com:

Hello,

I would like to install and run a wamp server on a embedded windows 7
computer in a local network. The computer that should run the server does
not have python installed by default and I would like to keep the setup as
simple as possible.
To do this I would like to try if for example py2exe
<http://www.py2exe.org/> is able to wrap crossbar and a dedicated python
runtime in a single executable. According to their website: "py2exe is a
Python Distutils extension which converts Python scripts into executable
Windows programs, able to run without requiring a Python installation."
this might be possible.

To get it working, I should first be able to run crossbar in the console
using "python <some python file> [probably an argument]" (so not the
command to install crossbar or to start it after installation).
Is this possible to execute crossbar from the sources? And if so, what
command should I use?
Also, is there any reason why it would be impossible to wrap crossbar like
that? (if it is certain to fail I would be wasting my time)

Kind regards, Nico

0 Likes