관리-도구
편집 파일: env.cpython-37.opt-1.pyc
B �M!VU � @ s� d dl Z d dlZd dlZddlmZ ddlmZmZ ddlm Z ddlm Z ddlmZ d d � Zd.dd�Z dd� Zdd� Zdd� Zd/dd�Zd0dd�Zd1dd�Zd2dd �Zd!d"� Zd#d$� Zd3d&d'�Zd(d)� Zd*d+� Zd,d-� ZdS )4� N� )�u)�Script�ScriptDirectory)�util� )�engines)� provisionc C s t jrdt j S dS d S )Nz scratch_%sZscratch)r ZFOLLOWER_IDENT� r r �D/opt/alt/python37/lib/python3.7/site-packages/alembic/testing/env.py�_get_staging_directory s r T�genericFc C s� ddl m}m} t� }| r�tj�t� d�}tj�|�r@t � |� |j|||d� |r�yt� |d� W n tk rx Y nX ttj�|d�� |j�|�}|S )Nr )�command�script�scripts)�templatezenv.py)Zalembicr r �_testing_config�os�path�joinr �exists�shutil�rmtreeZinitr Zload_python_file�AttributeError�make_sourcelessr �from_config)Zcreater � sourcelessr r �cfgr Zscr r r �staging_env s r c C s t �t� d� d S )NT)r r r r r r r �clear_staging_env. s r c C sB t j�t� d�}t j�|d�}t|d��}|�| � W d Q R X d S )Nr zscript.py.mako�w)r r r r �open�write)�txt�dir_r �fr r r �script_file_fixture2 s r&