File: //proc/self/root/opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyo
�
�M!Vc @ s# d d l Z d d l Z d d l Z d d l m Z d d l m Z m Z d d l m Z d d l m
Z
d d l m Z d � Z e
d
e d � Z d � Z d
� Z d � Z d d � Z e d � Z e d � Z d d d � Z d � Z d � Z d e d � Z d � Z d � Z d � Z d S( i����Ni ( t u( t Scriptt ScriptDirectory( t utili ( t engines( t provisionc C s t j r d t j Sd Sd S( Ns
scratch_%st scratch( R t FOLLOWER_IDENT( ( ( sD /opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt _get_staging_directory s t genericc C s� d d l m } m } t � } | r� t j j t � d � } t j j | � r_ t j
| � n | j | | d | �| r� y t j
| d � Wn t k
r� n Xt t j j | d � � q� n | j j | � } | S( Ni����( t commandt scriptt scriptst templates env.py( t alembicR
R t _testing_configt ost patht joinR t existst shutilt rmtreet initR t load_python_filet AttributeErrort make_sourcelessR t from_config( t createR
t
sourcelessR
R t cfgR t sc( ( sD /opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt staging_env s
c C s t j t � t � d S( N( R R R t True( ( ( sD /opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt clear_staging_env. s c C sV t j j t � d � } t j j | d � } t | d � � } | j | � Wd QXd S( NR s script.py.makot w( R R R R t opent write( t txtt dir_R t f( ( sD /opt/alt/python27/lib/python2.7/site-packages/alembic/testing/env.pyt script_file_fixture2 s c C s� t j j t � d � } d | } t j j | d � } t j | � } t j | t j � rk t j | � n t | d � � } | j
| � Wd QXd S( NR s6
from alembic import context
config = context.config
s env.pyR"