Example #1
0
    def _make_relocatable(self):
        """ remove the build directory from the shebangs in the bin dir """
        logging.info('Making relocatable')
        new_shebang = '#!' + os.path.join('/', self.root, 'bin', 'python')
        virtualenv.fixup_scripts(self.root, new_shebang, use_activate=False)
        virtualenv.fixup_pth_and_egg_link(self.root)

        logging.info('relinking local directories')
        # FIXME: these seem to be an ubuntu hack looking at the
        # virtualenv source, should be fixed by make relocatable
        for src in glob.glob(os.path.join(self.root, 'local', '*')):
            dst = os.path.join('/', self.root, os.path.basename(src))
            logging.debug('linking %s to %s', src, dst)
            os.remove(src)
            os.system('ln -s %(dst)s %(src)s' % locals())
Example #2
0
    def _make_relocatable(self):
        """ remove the build directory from the shebangs in the bin dir """
        logging.info('Making relocatable')
        new_shebang = '#!' + os.path.join('/', self.root, 'bin', 'python')
        virtualenv.fixup_scripts(self.root, new_shebang, use_activate=False)
        virtualenv.fixup_pth_and_egg_link(self.root)

        logging.info('relinking local directories')
        # FIXME: these seem to be an ubuntu hack looking at the
        # virtualenv source, should be fixed by make relocatable
        for src in glob.glob(os.path.join(self.root, 'local', '*')):
            dst = os.path.join('/', self.root, os.path.basename(src))
            logging.debug('linking %s to %s', src, dst)
            os.remove(src)
            os.system('ln -s %(dst)s %(src)s' % locals())
Example #3
0
def _make_environment_relocatable(home_dir):
    home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir)

    _fixup_scripts(bin_dir)
    fixup_pth_and_egg_link(home_dir)
Example #4
0
def _make_environment_relocatable(home_dir):
    home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir)

    _fixup_scripts(bin_dir)
    fixup_pth_and_egg_link(home_dir)