<commit_before># =============================================================================
# COPYRIGHT 2013 Brain Corporation.
# License under MIT license (see LICENSE file)
# =============================================================================

import os
from requirement import RequirementException
import subprocess
import sys


def install(robustus, requirement_specifier, rob_file, ignore_index):
    robustus.install_through_wheeling(requirement_specifier, rob_file, ignore_index)

    # need links to shared libraries
    cwd = os.getcwd()
    pyside_setup_dir = os.path.join(robustus.cache, 'pyside-setup-master')
    if not os.path.isdir(pyside_setup_dir):
        os.chdir(robustus.cache)
        subprocess.call(['wget',
                         '-c',
                         'https://github.com/PySide/pyside-setup/archive/master.zip',
                         '-O', 'pyside-setup-master.zip'])
        subprocess.call(['unzip', 'pyside-setup-master.zip'])
        os.chdir(pyside_setup_dir)
        subprocess.call([sys.executable, 'pyside_postinstall.py', '-install'])
        os.chdir(cwd)
    else:
        raise RequirementException('can\'t find pyside-%s in robustus cache' % requirement_specifier.version)<commit_msg>using download and unpack for pyside post install<commit_after># =============================================================================
# COPYRIGHT 2013 Brain Corporation.
# License under MIT license (see LICENSE file)
# =============================================================================

import os
from requirement import RequirementException
import subprocess
import sys
from utils import unpack


def install(robustus, requirement_specifier, rob_file, ignore_index):
    robustus.install_through_wheeling(requirement_specifier, rob_file, ignore_index)

    # need links to shared libraries
    pyside_setup_dir = os.path.join(robustus.cache, 'pyside-setup-master')
    if not os.path.isdir(pyside_setup_dir) and not ignore_index:
        os.chdir(robustus.cache)
        pyside_setup_archive = robustus.download('pyside-setup', 'master')
        unpack(pyside_setup_archive)

    cwd = os.getcwd()
    try:
        # run postinstall
        if not os.path.isdir(pyside_setup_dir):
            raise RequirementException('can\'t find pyside-%s in robustus cache' % requirement_specifier.version)
        os.chdir(pyside_setup_dir)
        retcode = subprocess.call([sys.executable, 'pyside_postinstall.py', '-install'])
        if retcode != 0:
            raise RequirementException('failed to execute pyside postinstall script')
    finally:
        os.chdir(cwd)
{'fraction_non_alphanumeric': 0.20341555977229603, 'fraction_numerical': 0.003415559772296015, 'mean_word_length': 3.954887218045113, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '344210', 'n_tokens_mistral': 735, 'n_tokens_neox': 721, 'n_words': 157}