示例#1
0
    def bootstrap(self, python='pypy'):
        # Create the user only if it does not already exist
        users.createService(self.serviceUser)

        with settings(user=self.serviceUser):
            # Install twisted
            pip.install('twisted', python=python)

            # Create base directory setup
            run('/bin/mkdir -p {} {} {}'.format(
                self.runDir,
                self.logDir,
                self.binDir))

            # Create stop script
            stopFile = FilePath(__file__).sibling('stop')
            put(stopFile.path, '{}/stop'.format(self.binDir), mode=0755)

            readme = self._generateReadme()
            put(StringIO(readme), 'README')
示例#2
0
文件: service.py 项目: rodrigc/braid
    def bootstrap(self, venv_site_packages=False):
        # Create the user only if it does not already exist
        users.createService(self.serviceUser)

        with settings(user=self.serviceUser):

            # Create a virtualenv in the service user's folder
            # It'll be a PyPy venv by default, unless self.python is changed
            self.venv.create(site_packages=venv_site_packages)

            # Create base directory setup
            run('/bin/mkdir -p {} {} {} {}'.format(
                self.runDir,
                self.logDir,
                self.binDir,
                self.configDir,
                ))

            # Create stop script
            stopFile = FilePath(__file__).sibling('stop')
            put(stopFile.path, '{}/stop'.format(self.binDir), mode=0755)

            readme = self._generateReadme()
            put(StringIO(readme), 'README')
示例#3
0
    def bootstrap(self, venv_site_packages=False):
        # Create the user only if it does not already exist
        users.createService(self.serviceUser)

        with settings(user=self.serviceUser):

            # Create a virtualenv in the service user's folder
            # It'll be a PyPy venv by default, unless self.python is changed
            self.venv.create(site_packages=venv_site_packages)

            # Create base directory setup
            run('/bin/mkdir -p {} {} {} {}'.format(
                self.runDir,
                self.logDir,
                self.binDir,
                self.configDir,
                ))

            # Create stop script
            stopFile = FilePath(__file__).sibling('stop')
            put(stopFile.path, '{}/stop'.format(self.binDir), mode=0o755)

            readme = self._generateReadme()
            put(StringIO(readme), 'README')
示例#4
0
            # For pypy translator
            'hg',
            'libffi-devel',
            'openssl-devel',
            'ncurses-devel',
            'expat-devel',
            'sqlite-devel',
            'zlib-devel',
            'bzip2-devel',
            ])

        # rpmbuild
        # subunit

        # Create home directory in default dir to avoid selinux issues.
        users.createService(self.serviceUser, base=None, groups=[])
        users.uploadLaunchpadKeys(self.serviceUser, 'tom.prince')

        pipPath = '~/.local/bin/pip'
        with settings(user='******'):
            pip.bootstrap(pipPath)

        self.bootstrap(python='system')

        with settings(user='******'):
            pip.install('bzr-svn', pip=pipPath)
            pip.install('buildbot-slave', pip=pipPath)
            pip.install(" ".join([
                'pydoctor==0.5b2',
                'pep8==1.3.3',
                'pylint==0.25.1',