예제 #1
0
    def test_buildout_bootstrap(self):
        b_dir = os.path.join(self.tdir, 'b')
        bd_dir = os.path.join(self.tdir, 'b', 'bdistribute')
        b2_dir = os.path.join(self.tdir, 'b', 'b2')
        self.assertTrue(buildout._has_old_distribute(self.py_dis))
        # this is too hard to check as on debian & other where old
        # packages are present (virtualenv), we can't have
        # a clean site-packages
        # self.assertFalse(buildout._has_old_distribute(self.py_blank))
        self.assertFalse(buildout._has_old_distribute(self.py_st))
        self.assertFalse(buildout._has_setuptools7(self.py_dis))
        self.assertTrue(buildout._has_setuptools7(self.py_st))
        self.assertFalse(buildout._has_setuptools7(self.py_blank))

        ret = buildout.bootstrap(
            bd_dir, buildout_ver=1, python=self.py_dis)
        comment = ret['outlog']
        self.assertTrue('--distribute' in comment)
        self.assertTrue('Generated script' in comment)

        ret = buildout.bootstrap(b_dir, buildout_ver=1, python=self.py_blank)
        comment = ret['outlog']
        # as we may have old packages, this test the two
        # behaviors (failure with old setuptools/distribute)
        self.assertTrue(
            ('Got ' in comment
             and 'Generated script' in comment)
            or ('setuptools>=0.7' in comment)
        )

        ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_blank)
        comment = ret['outlog']
        self.assertTrue(
            ('setuptools' in comment
             and 'Generated script' in comment)
            or ('setuptools>=0.7' in comment)
        )

        ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_st)
        comment = ret['outlog']
        self.assertTrue(
            ('setuptools' in comment
             and 'Generated script' in comment)
            or ('setuptools>=0.7' in comment)
        )

        ret = buildout.bootstrap(b2_dir, buildout_ver=2, python=self.py_st)
        comment = ret['outlog']
        self.assertTrue(
            ('setuptools' in comment
             and 'Creating directory' in comment)
            or ('setuptools>=0.7' in comment)
        )
예제 #2
0
 def test_run_buildout(self):
     b_dir = os.path.join(self.tdir, 'b')
     ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_st)
     self.assertTrue(ret['status'])
     ret = buildout.run_buildout(b_dir, parts=['a', 'b'])
     out = ret['out']
     self.assertTrue('Installing a' in out)
     self.assertTrue('Installing b' in out)
예제 #3
0
 def test_run_buildout(self):
     b_dir = os.path.join(self.tdir, 'b')
     ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_st)
     self.assertTrue(ret['status'])
     ret = buildout.run_buildout(b_dir,
                                 parts=['a', 'b'])
     out = ret['out']
     self.assertTrue('Installing a' in out)
     self.assertTrue('Installing b' in out)
예제 #4
0
    def test_buildout_bootstrap(self):
        b_dir = os.path.join(self.tdir, 'b')
        bd_dir = os.path.join(self.tdir, 'b', 'bdistribute')
        b2_dir = os.path.join(self.tdir, 'b', 'b2')
        self.assertTrue(buildout._has_old_distribute(self.py_dis))
        # this is too hard to check as on debian & other where old
        # packages are present (virtualenv), we can't have
        # a clean site-packages
        # self.assertFalse(buildout._has_old_distribute(self.py_blank))
        self.assertFalse(buildout._has_old_distribute(self.py_st))
        self.assertFalse(buildout._has_setuptools7(self.py_dis))
        self.assertTrue(buildout._has_setuptools7(self.py_st))
        self.assertFalse(buildout._has_setuptools7(self.py_blank))

        ret = buildout.bootstrap(bd_dir, buildout_ver=1, python=self.py_dis)
        comment = ret['outlog']
        self.assertTrue('--distribute' in comment)
        self.assertTrue('Generated script' in comment)

        ret = buildout.bootstrap(b_dir, buildout_ver=1, python=self.py_blank)
        comment = ret['outlog']
        # as we may have old packages, this test the two
        # behaviors (failure with old setuptools/distribute)
        self.assertTrue(('Got ' in comment and 'Generated script' in comment)
                        or ('setuptools>=0.7' in comment))

        ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_blank)
        comment = ret['outlog']
        self.assertTrue(
            ('setuptools' in comment and 'Generated script' in comment)
            or ('setuptools>=0.7' in comment))

        ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_st)
        comment = ret['outlog']
        self.assertTrue(
            ('setuptools' in comment and 'Generated script' in comment)
            or ('setuptools>=0.7' in comment))

        ret = buildout.bootstrap(b2_dir, buildout_ver=2, python=self.py_st)
        comment = ret['outlog']
        self.assertTrue(
            ('setuptools' in comment and 'Creating directory' in comment)
            or ('setuptools>=0.7' in comment))
예제 #5
0
    def test_run_buildout(self):
        if salt.modules.virtualenv_mod.virtualenv_ver(
                self.ppy_st) >= (20, 0, 0):
            self.skipTest("Skiping until upstream resolved"
                          " https://github.com/pypa/virtualenv/issues/1715")

        b_dir = os.path.join(self.tdir, "b")
        ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_st)
        self.assertTrue(ret["status"])
        ret = buildout.run_buildout(b_dir, parts=["a", "b"])
        out = ret["out"]
        self.assertTrue("Installing a" in out)
        self.assertTrue("Installing b" in out)
예제 #6
0
    def test_run_buildout(self):
        if salt.modules.virtualenv_mod.virtualenv_ver(
                self.ppy_st) >= (20, 0, 0):
            self.skipTest(
                "Skiping until upstream resolved https://github.com/pypa/virtualenv/issues/1715"
            )

        b_dir = os.path.join(self.tdir, 'b')
        ret = buildout.bootstrap(b_dir, buildout_ver=2, python=self.py_st)
        self.assertTrue(ret['status'])
        ret = buildout.run_buildout(b_dir, parts=['a', 'b'])
        out = ret['out']
        self.assertTrue('Installing a' in out)
        self.assertTrue('Installing b' in out)