Пример #1
0
 def test_pack_1(self, _get_version):
     _get_version.return_value = 12345
     args = '-c buildout-tests.cfg install test_pack_1'
     try:
         buildout.main(args.split())
     except SystemExit:
         pass
     self._verify_tarfile('python-12345.tar.gz')
Пример #2
0
 def test_pack_1(self, _get_version):
     _get_version.return_value = 12345
     args = '-c buildout-tests.cfg install test_pack_1'
     try:
         buildout.main(args.split())
     except SystemExit:
         pass
     self._verify_tarfile('python-12345.tar.gz')
    def test_requirements_file_integration(self):
        """Requirements.txt is applied."""
        buildout.main(['bootstrap'])
        buildout.main(['-c', 'buildout.cfg', 'install', 'odoo'])

        with open(os.path.join('bin', 'start_odoo')) as f:
            start_odoo = f.read()
        self.assertTrue('foobar-0.0.3' + EGG_SUFFIX in start_odoo)
        self.assertFalse('foobar-0.0.4'in start_odoo)
    def test_requirements_file_integration_with_versions(self):
        """Versions have precedence."""
        buildout.main(['bootstrap'])
        buildout.main(['-c', 'buildout_with_versions.cfg', 'install', 'odoo'])

        with open(os.path.join('bin', 'start_odoo')) as f:
            start_odoo = f.read()
        self.assertTrue('foobar-0.0.4' + EGG_SUFFIX in start_odoo)
        self.assertFalse('foobar-0.0.3'in start_odoo)
    def test_requirements_file_integration(self):
        """Requirements.txt is applied."""
        buildout.main(['bootstrap'])
        buildout.main(['-c', 'buildout.cfg', 'install', 'odoo'])

        with open(os.path.join('bin', 'start_odoo')) as f:
            start_odoo = f.read()
        self.assertTrue('foobar-0.0.3' + EGG_SUFFIX in start_odoo)
        self.assertFalse('foobar-0.0.4' in start_odoo)
    def test_requirements_file_integration_with_versions(self):
        """Versions have precedence."""
        buildout.main(['bootstrap'])
        buildout.main(['-c', 'buildout_with_versions.cfg', 'install', 'odoo'])

        with open(os.path.join('bin', 'start_odoo')) as f:
            start_odoo = f.read()
        self.assertTrue('foobar-0.0.4' + EGG_SUFFIX in start_odoo)
        self.assertFalse('foobar-0.0.3' in start_odoo)
Пример #7
0
 def run(self):
     try:
         from zc.buildout.buildout import main
     except ImportError:
         print('Please install buildout!\n  pip install zc.buildout')
         sys.exit(1)
     errno = main(sys.argv[sys.argv.index('buildout')+1:])
     if errno == 0:
         print('Now you can run tests using: bin/py.test')
         print('Now you can test current code using: bin/git-repo')
         print('Thank you 🍻')
     sys.exit(errno)
Пример #8
0
 def run(self):
     try:
         from zc.buildout.buildout import main
     except ImportError:
         print('Please install buildout!\n  pip install zc.buildout')
         sys.exit(1)
     errno = main(sys.argv[sys.argv.index('buildout') + 1:])
     if errno == 0:
         print('Now you can run tests using: bin/py.test')
         print('Now you can test current code using: bin/git-repo')
         print('Thank you 🍻')
     sys.exit(errno)
import sys
from zc.buildout import buildout

if __name__ == '__main__':
    sys.exit(buildout.main())
Пример #10
0
                                       )
                                      for dist in upgraded
                                      ]
                                     ),
                          )

        # the new dist is different, so we've upgraded.
        # Update the scripts and return True
        zc.buildout.easy_install.scripts(
            ['zc.buildout'], ws, sys.executable,
            self['buildout']['bin-directory'],
            )

        # Restart
        args = map(zc.buildout.easy_install._safe_arg, sys.argv)
        if not __debug__:
            args.insert(0, '-O')
        args.insert(0, zc.buildout.easy_install._safe_arg (sys.executable))

        if is_jython:
            sys.exit(subprocess.Popen([sys.executable] + list(args)).wait())
        else:
            sys.exit(os.spawnv(os.P_WAIT, sys.executable, args))

zc_buildout.Buildout._maybe_upgrade = _maybe_upgrade

# now calling the bootstrap process as usual
zc_buildout.main(args)
shutil.rmtree(tmpeggs)

Пример #11
0
# -*- coding: utf-8 -*-

import sys

from pypi2nix.cli import main
from zc.buildout import buildout


if __name__ == '__main__':
    if len(sys.argv) > 2 and sys.argv[1] == buildout:
        buildout.main(sys.argv[2:])
    else:
        main(sys.argv[1:])
Пример #12
0
def buildout(*args):
    argv = sys.argv[:]
    sys.argv = ["foo"] + list(args)
    ret = bo.main()
    sys.argv=argv
    return ret
Пример #13
0
def buildout(*args):
    argv = sys.argv[:]
    sys.argv = ["foo"] + list(args)
    ret = bo.main()
    sys.argv = argv
    return ret
Пример #14
0
 def test_dry_run(self):
     args = '-c buildout-tests.cfg'
     buildout.main(args.split())
Пример #15
0
 def test_dry_run(self):
     args = '-c buildout-tests.cfg'
     buildout.main(args.split())