title: Packaging a Python library with an executable
body: <p>I just finished a module and want to package it. I've read the documentation and this question <a href="https://stackoverflow.com/questions/7156333/packaging-a-python-application">packaging a python application</a> but I am not sure about how to proceed when I don't have a package to import but a script to launch instead.</p>
  
  <p>The project looks like that:</p>
  
  <pre><code>Project/
  |-- README
  |-- requirement.txt
  |-- driver.py
  |-- run.py
  |-- module_1
  |   |-- __init__.py
  |   |-- class_1.py
  |   |-- class_2.py
  |-- module 2
  |-- |-- __init__.py
  |-- |-- class_1.py
  |-- |-- class_2.py
  </code></pre>
  
  <p>In order to launch the tool I do:</p>
  
  <pre><code>python run.py arg1 --option arg2
  </code></pre>
  
  <p><code>driver.py</code> imports all other modules and defines a <code>Driver</code> class and some functions. <code>run.py</code> imports <code>driver.py</code>, parse arguments, setups the logger and calls the function one after the others to do the job.</p>
  
  <p>I'm not sure about the configuration of <code>setup.py</code>, also do I need a global <code>__init__.py</code> at the root? From what I've understand, I will only be able to do <code>import Project</code> not to launch the script <code>run.py</code> with its arguments. </p>
  
  <p>From other readings, maybe I should try to tell that <code>Driver.py</code> is the package and use the <code>entry_points</code> option of <code>setup()</code>. But I don't understand how to do all of it properly.</p>
  
  <p>Thank you for your kind help!</p>