def test_needs_sdist_without_options(): """Test that a custom sdist can be used in needs() w/o options.setup""" _sdist.reset() @tasks.task @tasks.needs("paver.tests.test_setuputils.sdist") def sdist(): assert _sdist.called @tasks.task @tasks.needs("sdist") def t1(): pass env = _set_environment(sdist=sdist, t1=t1) env.options = options.Bunch() install_distutils_tasks() d = _get_distribution() d.cmdclass['sdist'] = _sdist tasks._process_commands(['t1']) assert sdist.called assert _sdist.called assert t1.called cmd = d.get_command_obj('sdist') assert not cmd.foo assert not _sdist.foo_set
def test_task_with_distutils_dep(): _sdist.reset() @tasks.task @tasks.needs("paver.tests.test_setuputils.sdist") def sdist(): assert _sdist.called env = _set_environment(sdist=sdist) env.options = options.Bunch(setup=options.Bunch()) install_distutils_tasks() d = _get_distribution() d.cmdclass['sdist'] = _sdist task_obj = env.get_task('sdist') assert task_obj == sdist needs_obj = env.get_task(task_obj.needs[0]) assert isinstance(needs_obj, DistutilsTask) assert needs_obj.command_class == _sdist tasks._process_commands(['sdist', "-f"]) assert sdist.called assert _sdist.called cmd = d.get_command_obj('sdist') print_("Cmd is: %s" % cmd) assert cmd.foo assert _sdist.foo_set
def test_negative_opts_handled_for_distutils(): _sdist.reset() env = _set_environment() env.options = options.Bunch(setup=options.Bunch()) install_distutils_tasks() d = _get_distribution() d.cmdclass['sdist'] = _sdist_with_default_foo tasks._process_commands(['sdist', '--no-foo']) assert _sdist.called assert not _sdist.foo_set
def test_distutils_tasks_should_not_get_extra_options(): _sdist.reset() env = _set_environment() env.options = options.Bunch(setup=options.Bunch()) install_distutils_tasks() d = _get_distribution() d.cmdclass['sdist'] = _sdist tasks._process_commands(['sdist']) assert _sdist.called assert not _sdist.foo_set opts = d.get_option_dict('sdist') assert 'foo' not in opts
def test_override_distutils_command(): @tasks.task def sdist(): pass env = _set_environment(sdist=sdist) env.options = options.Bunch(setup=options.Bunch()) install_distutils_tasks() d = _get_distribution() d.cmdclass['sdist'] = _sdist tasks._process_commands(['sdist', 'paver.tests.test_setuputils.sdist', '-f']) assert sdist.called assert _sdist.called assert _sdist.foo_set assert isinstance(_sdist.fin, _sdist)
def test_override_distutils_command(): @tasks.task def sdist(): pass env = _set_environment(sdist=sdist) env.options = options.Bunch(setup=options.Bunch()) install_distutils_tasks() d = _get_distribution() d.cmdclass['sdist'] = _sdist tasks._process_commands( ['sdist', 'paver.tests.test_setuputils.sdist', '-f']) assert sdist.called assert _sdist.called assert _sdist.foo_set assert isinstance(_sdist.fin, _sdist)
url='http://ftp.gnu.org/gnu/texinfo/texinfo-6.1.tar.gz'), graphviz=Bunch( sdir=path('puticr/download'), url= 'https://github.com/ellson/graphviz/releases/download/Nightly/graphviz-2.41.20170103.1755.tar.gz' ), virtualenv=Bunch(packages_to_install=[], no_site_packages=True)) INSTRUICTIONS = """ Run $ source puticr/bin/activate to enter the virtual environment and $ deactivate to exit the environment. #sudo yum install lzma-devel.x86_64 xz-devel.x86_64 pyliblzma.x86_64 """ install_distutils_tasks() # Miscellaneous helper functions @task def bootstrap(options): """Create virtualenv in ./bootstrap""" try: import virtualenv except ImportError, e: raise RuntimeError("Virtualenv is needed for bootstrap") options.virtualenv.no_site_packages = False options.bootstrap.no_site_packages = False call_task("paver.virtualenv.boostrap")
"""Print a message indicating failure in red color to STDERR. :param message: the message to print :type message: :class:`str` """ try: import colorama print(colorama.Fore.RED + message + colorama.Fore.RESET, file=sys.stderr) except ImportError: print(message, file=sys.stderr) options(setup=setup_dict) install_distutils_tasks() ## Task-related functions def _doc_make(*make_args): """Run make in sphinx' docs directory. :return: exit code """ if sys.platform == 'win32': # Windows make_cmd = ['make.bat'] else: # Linux, Mac OS X, and others make_cmd = ['make']
# the Initial Developer. All Rights Reserved. # # Contributor(s): # # ***** END LICENSE BLOCK ***** # import re import os from setuptools import find_packages from paver.setuputils import find_package_data from paver.easy import * from paver import setuputils setuputils.install_distutils_tasks() execfile(os.path.join('bespin', '__init__.py')) options( setup=Bunch( name="BespinServer", version=VERSION, packages=find_packages(), package_data=find_package_data('bespin', 'bespin', only_in_packages=False), entry_points=""" [console_scripts] bespin_worker=bespin.queue:process_queue queue_stats=bespin.queuewatch:command
# minilib does not support bootstrap pass import os from paver.easy import * from paver.easy import task, options, Bunch from paver.easy import cmdopts #,consume_args from paver.easy import path, sh, info from paver.easy import call_task #debug, from paver.tasks import help, needs from paver.easy import call_task from setuptools import find_packages from paver.setuputils import setup from ConfigParser import ConfigParser from paver import setuputils setuputils.install_distutils_tasks() version = '0.1.5' try: description = ''.join([x for x in open('README.rst')]) except IOError: description = "" setup( name='JSTools', version=version, description= "assorted python tools for building (packing, aggregating) javascript libraries", long_description=description, classifiers=[ "Development Status :: 3 - Alpha",