Skip to content

Commit

Permalink
tasks moved to paved
Browse files Browse the repository at this point in the history
  • Loading branch information
ponty committed Feb 8, 2012
1 parent 4f485a0 commit 6c893a8
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions pavement.py
Expand Up @@ -13,6 +13,7 @@
from paved.util import * from paved.util import *
from paved.docs import * from paved.docs import *
from paved.pycheck import * from paved.pycheck import *
from paved.pkg import *
from sphinxcontrib import paverutils from sphinxcontrib import paverutils
ALL_TASKS_LOADED = True ALL_TASKS_LOADED = True
except ImportError, e: except ImportError, e:
Expand Down Expand Up @@ -122,39 +123,3 @@ def pdf():
fpdf.copy(d) fpdf.copy(d)




def install_test(installer):
import virtualenv
import tempfile
import textwrap
root = path(tempfile.mkdtemp(prefix=NAME + '_'))
info( 'root='+ root)
script = root / 'start_virtualenv'

txt = """
def after_install(options, home_dir):
assert not os.system('{installer} {NAME}')
""".format(
NAME=NAME,
installer=root / 'env' / 'bin' / installer,
)

script_text = virtualenv.create_bootstrap_script(textwrap.dedent(txt))
script.write_text(script_text)
script.chmod(0755)
sh('./start_virtualenv env --no-site-packages', cwd=root)

@task
def pypi_pip():
install_test('pip install')

@task
def pypi_easy_install():
install_test('easy_install')

@task
@needs(
'pypi_easy_install',
'pypi_pip',
)
def pypi():
pass

0 comments on commit 6c893a8

Please sign in to comment.