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

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: 6

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: lanpa/tensorboardX
Commit Name: 5619f0a742cfee882b51b6798215362e227c2732
Time: 2018-04-28
Author: huang.dexter@gmail.com
File Name: tensorboardX/graph.py
Class Name:
Method Name: parse


Project Name: brian-team/brian2
Commit Name: c84200e9bb97b39a73778e5b32df3b85cb2614c9
Time: 2013-06-25
Author: dan.goodman@ens.fr
File Name: brian2/tests/test_syntax_translation.py
Class Name:
Method Name: parse_expressions