Beispiel #1
0
 def assert_scripts_were_generated_by_buildout(self):
     self.assertTrue(path.exists("setup.py"))
     self.assertTrue(
         assertions.is_executable_exists(path.join("bin", "buildout")))
     self.assertTrue(
         assertions.is_executable_exists(path.join("bin", "python")))
     self.assertTrue(
         assertions.is_executable_exists(path.join("bin", "ipython")))
Beispiel #2
0
 def bootstrap_if_necessary(self):
     from os.path import join
     from pkg_resources import resource_filename
     from infi.projector.plugins.builtins.repository import skeleton
     buildout_executable_exists = assertions.is_executable_exists(join("bin", "buildout"))
     if not buildout_executable_exists or self.arguments.get("--force-bootstrap", False) or self.arguments.get("--newest", False):
         try:
             utils.execute_assert_success([utils.get_executable('buildout'), 'bootstrap'])
         except OSError:  # workaround for OSX
             utils.execute_assert_success(['buildout', 'bootstrap'])
Beispiel #3
0
 def bootstrap_if_necessary(self):
     from os.path import join
     from pkg_resources import resource_filename
     from infi.projector.plugins.builtins.repository import skeleton
     buildout_executable_exists = assertions.is_executable_exists(join("bin", "buildout"))
     bootstrap_py = resource_filename(skeleton.__name__, "bootstrap.py")
     with open("bootstrap.py", "w") as dst:
         with open(bootstrap_py) as src:
             dst.write(src.read())
     if not buildout_executable_exists or self.arguments.get("--force-bootstrap", False) or self.arguments.get("--newest", False):
         utils.execute_with_python(self._get_bootstrap_command())
Beispiel #4
0
 def bootstrap_if_necessary(self):
     from os.path import join, split
     from os import name
     from sys import argv
     from pkg_resources import resource_filename
     from infi.projector.plugins.builtins.repository import skeleton
     buildout_executable_exists = assertions.is_executable_exists(join("bin", "buildout"))
     if not buildout_executable_exists or self.arguments.get("--force-bootstrap", False) or self.arguments.get("--newest", False):
         try:
             return utils.execute_assert_success([utils.get_executable('buildout'), 'bootstrap'])
         except OSError:  # workaround for OSX
             pass
         try:
             utils.execute_assert_success(['buildout', 'bootstrap'])
         except OSError:
             dirname, basename = split(argv[0])
             buildout = join(dirname, 'buildout.exe' if name == 'nt' else 'buildout')
             utils.execute_assert_success([buildout, 'bootstrap'])
Beispiel #5
0
 def bootstrap_if_necessary(self):
     from os.path import join, split
     from os import name
     from sys import argv
     from pkg_resources import resource_filename
     from infi.projector.plugins.builtins.repository import skeleton
     buildout_executable_exists = assertions.is_executable_exists(
         join("bin", "buildout"))
     if not buildout_executable_exists or self.arguments.get(
             "--force-bootstrap", False) or self.arguments.get(
                 "--newest", False):
         try:
             return utils.execute_assert_success(
                 [utils.get_executable('buildout'), 'bootstrap'])
         except OSError:  # workaround for OSX
             pass
         try:
             utils.execute_assert_success(['buildout', 'bootstrap'])
         except OSError:
             dirname, basename = split(argv[0])
             buildout = join(dirname,
                             'buildout.exe' if name == 'nt' else 'buildout')
             utils.execute_assert_success([buildout, 'bootstrap'])
Beispiel #6
0
 def bootstrap_if_necessary(self):
     from os.path import join
     buildout_executable_exists = assertions.is_executable_exists(join("bin", "buildout"))
     if not buildout_executable_exists or self.arguments.get("--force-bootstrap", False) or self.arguments.get("--newest", False):
         utils.execute_with_python(self._get_bootstrap_command())
 def assert_scripts_were_generated_by_buildout(self):
     self.assertTrue(path.exists("setup.py"))
     self.assertTrue(assertions.is_executable_exists(path.join("bin", "buildout")))
     self.assertTrue(assertions.is_executable_exists(path.join("bin", "python")))
     self.assertTrue(assertions.is_executable_exists(path.join("bin", "ipython")))