942f284052b22214d830c1bc2c8de03bffaa8d07,build_tools/azure/render_meta.py,,,#,8

Before Change



// We build from source on windows, otherwise, we looks for a wheel
if sys.platform != "win32":
    wheel = next(file for file in os.listdir(str(DIST_PATH.resolve()))
                 if file.endswith(".whl"))
else:
    wheel = None

// Numpy version is used for building
numpy_version = next(package for package in requirements if "numpy" in package)

// Render and write the meta.yaml file to $ROOT/conda/meta.yaml
context = {
    "requirements": requirements,
    "numpy_version": numpy_version,
    "VERSION": VERSION,
    "wheel": wheel,
    "py_version": "{0.major}{0.minor}".format(sys.version_info)
}

After Change


// conda puts a space between packages and versions, so we have to match that
requirements = []
with open(str(REQUIREMENTS_FILE.resolve())) as file:
    for line in file:
        requirement = line.strip()
        match = re.match(r"^([A-Za-z\-0-9]+)", requirement)
        _, match_end = match.span()
        package = match.group(0)
        version = requirement[match_end:].replace("==", "")
        requirements.append(f"{package} {version}")

// Render and write the meta.yaml file to $ROOT/conda/meta.yaml
context = {
    "requirements": requirements,
    "VERSION": VERSION
}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: tgsmith61591/pmdarima
Commit Name: 942f284052b22214d830c1bc2c8de03bffaa8d07
Time: 2020-02-18
Author: aaronreidsmith@gmail.com
File Name: build_tools/azure/render_meta.py
Class Name:
Method Name:


Project Name: gyoisamurai/GyoiThon
Commit Name: 4f53bca9b044b20bc4aa8b7719bbbb2984623b3a
Time: 2018-06-04
Author: gyoiler3@gmail.com
File Name: classifier4gyoithon/GyoiClassifier.py
Class Name:
Method Name:


Project Name: gyoisamurai/GyoiThon
Commit Name: 5765f471197edbf64a57dd2628dcd3051c7ea46c
Time: 2018-06-04
Author: gyoiler3@gmail.com
File Name: gyoithon.py
Class Name:
Method Name: