Distribute a simple python script
Question: I have a simple python script which reads a text file and do some processing
on it. I need to distribute this code. So any one with Ubuntu operating system
could run it. I import some modules as follows.

    
    
    import pandas
    import httpbl
    from prettytable import from_csv
    

etc...

My question is how to make these packages installable with my script in any
other users machine(Ubuntu).

There are lot of questions asked and I found
[this](http://stackoverflow.com/questions/1950218/distributing-python-
programs) as the closest match. But any way I do not have much knowledge on
doing this.


Answer: You should checkout setuptools: <http://pythonhosted.org/setuptools/> which
can do exactly what you're looking for.

As an example (this is just a script in the same directory called "recat"):

    
    
    from setuptools import setup
    
    setup(
        name = 'recat',
        version = '0.1',
        packages = [],
        author = 'Name',
        author_email = 'email',
        description = 'Replay log files simply and easily',
        license = 'GPLv3',
        keywords = 'log replay',
        url = 'URL',
        scripts = ['recat']
    )
    

You might also consider creating a Ubuntu package out of it. The FPM project
can help you with that: <https://github.com/jordansissel/fpm>

