package a software for Windows with wine - python

I use Esky/cx_freeze to package a python program for different OS. When I have to do it for windows, I use Windows 7 on VirtualBox.
However, I find this method pretty unpleasant and heavy. So I wonder, is there a way to package programs for Windows through Wine ?
I would basically need to install all the libraries I need, then run some commands like "python setup.py bdist_esky".
I know the cx_freeze doc doesn't advice this, but I'm trying to find a better way to package my software. I wonder if someone has a better option.

Related

Packaging python code for distribution on machines without pip

Here's the situation:
I have developed some python code, and I have pip available on my machine. I pull in some libraries to make the program behave better, do advanced things, have colored output, etc...
Now I need to ship this code to boxes that do not have pip and will not ever have pip.
In node, it is trivial to achieve this. You can just deploy your node_modules folder and the npm install step isn't needed.
What's the best practice to do this for Python? The version I am working with is Python 2.6.8, and I only need to care about distributing to Linux machines.
I've read that it's possible to just freeze the entire project (including the Python interpreter) and just ship a binary. Would like to avoid that if possible, as it seems wasteful to do that in an environment where Python is available on all of your systems.
Thanks for any advice.

Numpy Installation: How do I fix the broken toolchain without Bash and limited permissions?

Preface: I am a Mac/Unix user and am now a little lost with Windows.
Situation: I am trying to use python on a school machine that has a 64-bit architecture and running Windows 7. I have gotten the module NetworkX to work via python setup.py install, but need the numerical libraries to be available as well.
Question: I have the identical output as this question elaborates and need to install numpy with correct dependencies. How do I do this with limited permissions?
Problems: The solution in the above link cannot be adopted in my case. I do not have Visual Studio 2008 and cannot install it due to permissions. Also, the linear algebra library that is required costs 500$, which frankly is a deal breaker. I thought I could adopt this SO solution, but I do not have access to Bash. I also cannot run .exe files due to permissions. All the modules I have installed have been using python setup.py install. Any help or suggestions are VERY much appreciated.
Could you install one of the scientific python distributions like Anaconda or Canopy? That might include everything you need. See http://scipy.org/install.html for a list of options.

How to package a python script for Windows OS(.exe)?

I want to distribute my open source python tool.
I created an install shell script for linux systems. What is the easiest way to create a graphical easy to use installer for Windows OS?
PS: I would consider the ability to add shortcut on desktop as a plus point.
Py2Exe is still the best way I'm aware of. You can do tricky things if you're someone like Dropbox.
EDIT If you're looking for advice on creating an installer, start here

Python: Handling modules

I wrote a program which uses a number of built in modules. The program is meant to be used by different persons on their systems. They dont have enough knowledge in python to install it when their system doesnt have the module needed to run the program. Is there any way of handling that.
Also I want to package the program as an executable in linux. It contains 3 py files and one text file only.
I think what you need is to create a debian package that handles the dependencies and the installation process.
I'm an Ubuntu user but this Complete Ubuntu Packaging Guide should help you get started. Good luck!
You can create an executable that contains your python modules and the python interpreter. You can use PyInstaller for creating such an executable.
I think the easiest way to achieve this on a debian distribution is to package your python application in a debian package. You can use this module to make life easier.

Deploying python app to Mac and Windows users

I've written an app in python that depends on wxPython and some other python libraries. I know about pyexe for making python scripts executable on Windows, but what would be the easiest way to share this with my Mac using friends who wouldn't know how to install the required dependencies? One option would be to bundle my dependencies in the same package, but that seems kind of clunky. How do people usually deploy such apps? For once I miss Java...
You could check out py2app, which is similar to py2exe
How do people usually deploy such apps?
2 choices.
With instructions.
All bundled up.
You write simple instructions like this. Folks can follow these pretty reliably, unless they don't have enough privileges. Sometimes they need to sudo in linux environments.
Download easy_install (or pip)
easy_install this, easy_install that (or pip this, pip that)
easy_install whatever package you wrote.
It works really well. If you download some Python packages you'll see this in action.
Sphinx requires docutils. Django requires docutils and PIL. It works out really well to simply document the dependencies. Other folks seem to do it without serious problems. Follow their lead.
Bundling things up means you have to
(a) provide the entire original distribution (as required by most open source licenses)
(b) provide a compatible open source license with the licenses of the things you bundled. This can be easy if you depend on things that all of the same license. Otherwise, you basically can't redistribute them and have to resort to installation instructions.

Categories

Resources