<s> import os <EOL> import re <EOL> import sys <EOL> from paver . easy import * <EOL> from paver . setuputils import setup , find_packages <EOL> ROOT = path . getcwd ( ) <EOL> sys . path . insert ( <NUM_LIT:0> , ROOT ) <EOL> from firepython . _setup_common import SETUP_ARGS <EOL> BUILD_DIR = ROOT / '<STR_LIT>' <EOL> DIST_DIR = ROOT / '<STR_LIT>' <EOL> FPY = ROOT / '<STR_LIT>' <EOL> FPY_EGG_INFO = ROOT / '<STR_LIT>' <EOL> CRUFT = [ <EOL> BUILD_DIR , <EOL> DIST_DIR , <EOL> FPY_EGG_INFO , <EOL> ROOT / '<STR_LIT>' , <EOL> ] <EOL> API_VERSION = re . compile ( r'<STR_LIT>' ) <EOL> PY_API_VERSION_DEF_RE = re . compile ( '<STR_LIT>' ) <EOL> PY_API_VERSION_DEF = '<STR_LIT>' <EOL> SETUP_ARGS [ '<STR_LIT>' ] = find_packages ( exclude = [ '<STR_LIT>' ] ) <EOL> setup ( ** SETUP_ARGS ) <EOL> @ task <EOL> @ needs ( [ '<STR_LIT>' ] ) <EOL> def pypi ( ) : <EOL> """<STR_LIT>""" <EOL> sh ( '<STR_LIT>' ) <EOL> sh ( '<STR_LIT>' ) <EOL> @ task <EOL> def clean ( ) : <EOL> """<STR_LIT>""" <EOL> for cruft_path in CRUFT : <EOL> if cruft_path . isfile ( ) : <EOL> cruft_path . remove ( ) <EOL> elif cruft_path . isdir ( ) : <EOL> cruft_path . rmtree ( ) <EOL> @ task <EOL> @ needs ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def sdist ( ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> _TESTS_INSTALL_PKG = """<STR_LIT>""" <EOL> @ task <EOL> def _pretest_check ( ) : <EOL> had_fail = False <EOL> for mod , pkg in ( ( '<STR_LIT>' , '<STR_LIT>' ) , ( '<STR_LIT>' , '<STR_LIT>' ) ) : <EOL> try : <EOL> import mock <EOL> except ImportError : <EOL> info ( _TESTS_INSTALL_PKG % dict ( mod = mod , pkg = pkg ) ) <EOL> had_fail = True <EOL> if had_fail : <EOL> raise ImportError <EOL> @ task <EOL> @ needs ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def test ( ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ task <EOL> def testall ( ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> import nose <EOL> except ImportError : <EOL> info ( _TESTS_INSTALL_PKG % dict ( mod = '<STR_LIT>' , pkg = '<STR_LIT>' ) ) <EOL> raise <EOL> args = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ROOT / '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> nose . run ( argv = args ) </s>
