3a6a64cdd6623597dbb64c85b44dd9ea0cf1516c,luminoth/tools/cloud/gcloud.py,,build_package,#Any#Any#,39

Before Change


        package_path
    ))

    with tempfile.TemporaryDirectory() as temp_dir:
        output_dir = os.path.join(temp_dir, "output")

        devnull = open(os.devnull, "w")
        subprocess.call(
            [
                "python", "setup.py", "egg_info", "--egg-base", temp_dir,
                "build", "--build-base", temp_dir, "--build-temp", temp_dir,
                "sdist", "--dist-dir", output_dir
            ],
            cwd=package_path, stdout=devnull, stderr=devnull
        )
        subprocess.call(
            [
                "python", "setup.py", "build", "--build-base", temp_dir,
                "--build-temp", temp_dir, "sdist", "--dist-dir", output_dir
            ],
            cwd=package_path, stdout=devnull, stderr=devnull
        )
        subprocess.call(
            ["python", "setup.py", "sdist", "--dist-dir", output_dir],
            cwd=package_path, stdout=devnull, stderr=devnull
        )

        tarball_filename = os.listdir(output_dir)[0]
        tarball_path = os.path.join(
            output_dir, tarball_filename
        )

        path = upload_file(
            bucket, "{}/packages".format(base_path), tarball_path
        )

        return path


def get_account_attribute(service_account_json, attr):
    return json.load(
        tf.gfile.GFile(service_account_json, "r")
    ).get(attr)

After Change


        package_path
    ))

    temp_dir = tempfile.mkdtemp()
    output_dir = os.path.join(temp_dir, "output")

    devnull = open(os.devnull, "w")
    subprocess.call(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tryolabs/luminoth
Commit Name: 3a6a64cdd6623597dbb64c85b44dd9ea0cf1516c
Time: 2017-10-20
Author: javirey@gmail.com
File Name: luminoth/tools/cloud/gcloud.py
Class Name:
Method Name: build_package


Project Name: RasaHQ/rasa
Commit Name: 007d14f8ad4d7b5ef5bb0d07b4ed807d163d03a3
Time: 2019-03-14
Author: t.metcalfe@rasa.com
File Name: tests/test_trackers.py
Class Name:
Method Name: stores_to_be_tested


Project Name: rtavenar/tslearn
Commit Name: 356be65be579d3eed9b8a8cef18c227e0ce68162
Time: 2018-05-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/datasets.py
Class Name:
Method Name: extract_from_zip_url