title: alembic - Example of using package resource as script_location
body: <p>I am attempting to include Alembic migrations as part of a python package distribution.  Since this distribution will be installed, the Alembic scripting directory (which holds the migrations) will end up being copied to the python packages folders.  In this case, how can I tell Alembic where to find this directory?</p>
  
  <p>In the Alembic documentation, it says that the <code>migration</code> directory can be specified in the <code>config.ini</code> file as a package reference:</p>
  
  <blockquote>
    <ul>
    <li><strong>script_location</strong> - this is the location of the Alembic environment. It is normally specified
    as a filesystem location, either relative or absolute. If the location is a relative path, it’s
    interpreted as relative to the current directory.</li>
    </ul>
  </blockquote>
  
  <p>(snip)</p>
  
  <blockquote>
    <p>For support of applications that package themselves into .egg files,
    the value can also be specified as a package resource, in which case
    resource_filename() is used to find the file (new in 0.2.2). Any
    non-absolute URI which contains colons is interpreted here as a
    resource name, rather than a straight filename.</p>
  </blockquote>
  
  <p>The documentation gives no further information or examples.</p>
  
  <p>Has anyone successfully implemented this?  How exactly do you make your <code>migration</code> scripting_folder into a "package resource"?  How then do you tell alembic where to find it?</p>