1

I have developed a tool in Python that I would be giving to an organization.

Suppose the organization is running Windows, and has none of Python, mechanize or BeautifulSoup module installed.

Now what is the best way to bundle/package my tool so that they could run it with the minimum overhead from their side?

As of now, I am asking them to do a lot of things.

Installation instructions:

Step 1. Download and install Python 2.7.3 from here

http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi

Step 2. Download and install easy_install from here

https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe#md5=57e1e64f6b7c7f1d2eddfc9746bbaf20

Step 3. Run the cmd prompt and run the following commands

easy_install mechanize
easy_install BeautifulSoup

Step 4. You are done.

Can the effort be minimized? How? I want it to be as easy as possible for them.

Aakash Anuj
  • 3,633
  • 7
  • 32
  • 45

1 Answers1

4

I think this type of question has been asked so many times.

For your use case, you could use pyinstaller. Here some example how to use it in your case:

Suppose your program is spam.py that contains following lines:

import mechanize
import BeautifulSoup

print "Hello World!"

After installing pyinstaller using pip install pyinstaller, execute the following command in the directory of your spam.py program.

pyinstaller spam.py

You'll get a bundled app for your program under the newly created dist folder. To create a single executable file for your app distribution, use --onefile option for the pyinstaller command. Now, you can copy the bundled file and give that to the organization.

Community
  • 1
  • 1
Mas Adit
  • 166
  • 1
  • 3