8c297ee989bdd23337d6107cc97e42241e07650a,setup.py,,,#,9

Before Change


def remove_requirement(requirements, name):
    return [x for x in requirements if name != x.split(" ")[0]]

os = platform.system()

about = {}
with open("mindsdb/__about__.py") as fp:
    exec(fp.read(), about)

long_description = open("README.md", encoding="utf-8").read()

with open("requirements.txt") as req_file:
    requirements = req_file.read().splitlines()

dependency_links = []

// Linux specific requirements
if os == "Linux":
    requirements = remove_requirement(requirements, "tensorflow-estimator")
    requirements = remove_requirement(requirements, "lightwood")
    requirements.append("lightwood == 0.6.7")

// OSX specific requirements
if os == "Darwin":
    requirements = requirements

// Windows specific requirements
if os == "Windows":
    requirements = remove_requirement(requirements, "tensorflow-estimator")
    requirements = remove_requirement(requirements,"wheel")
    requirements.append("wheel == 0.26.0")

    requirements = remove_requirement(requirements, "lightwood")
    requirements.append("lightwood == 0.7.1")
    dependency_links.append("https://github.com/mindsdb/lightwood/tarball/ci_testing//egg=lightwood-0.7.1")

setuptools.setup(
    name=about["__title__"],
    version=about["__version__"],
    url=about["__github__"],

After Change


def remove_requirements(requirements, name):
    return [x for x in requirements if name != x.split(" ")[0]]

sys_platform = sys.platform

about = {}
with open("mindsdb/__about__.py") as fp:
    exec(fp.read(), about)

long_description = open("README.md", encoding="utf-8").read()

with open("requirements.txt") as req_file:
    requirements = [req.strip() for req in req_file.read().splitlines()]

dependency_links = []

// Linux specific requirements
if sys_platform == "linux" or sys_platform.startswith("linux"):
    requirements = remove_requirements(requirements, "tensorflow-estimator")

// OSX specific requirements
elif sys_platform == "darwin":
    requirements = requirements

// Windows specific requirements
elif sys_platform in ["win32","cygwin"] :
    requirements = remove_requirements(requirements, "tensorflow-estimator")
    requirements = remove_requirements(requirements,"wheel")
    requirements.append("wheel == 0.26.0")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: mindsdb/mindsdb
Commit Name: 8c297ee989bdd23337d6107cc97e42241e07650a
Time: 2019-07-23
Author: george@cerebralab.com
File Name: setup.py
Class Name:
Method Name:


Project Name: pytorch/audio
Commit Name: 2fd32dd017c0332956e913bb08c20867bfbe3abe
Time: 2020-06-08
Author: 855818+mthrok@users.noreply.github.com
File Name: torchaudio/_backend.py
Class Name:
Method Name:


Project Name: mindsdb/mindsdb
Commit Name: 8c297ee989bdd23337d6107cc97e42241e07650a
Time: 2019-07-23
Author: george@cerebralab.com
File Name: setup.py
Class Name:
Method Name:


Project Name: mindsdb/mindsdb
Commit Name: 545f96736113419449f5d8181211be4c17a678fa
Time: 2019-07-25
Author: george@cerebralab.com
File Name: setup.py
Class Name:
Method Name: