7560936f09755b3fafe03ae1c5ccebb3c93984b6,setup.py,,,#,60
Before Change
// requirement to avoid installing over e.g. tensorflow-gpu
// To avoid this, rely on importing rather than the package name (like pip).
try:
// If tf not installed, import raises ImportError
import tensorflow as tf
if parse_version(tf.__version__) < parse_version(min_tf_version):
// TF pre-installed, but below the minimum required version
raise DeprecationWarning("TensorFlow version below minimum requirement")
except (ImportError, DeprecationWarning):
// Add TensorFlow to dependencies to trigger installation/update
if not on_readthedocs:
// Do not add TF if we are installing GPflow on readthedocs
requirements.append(tf_cpu)
gast_requirement = (
"gast>=0.2.2,<0.3"
if latest_version("tensorflow") < parse_version("2.2")
else "gast>=0.3.3"
)
requirements.append(gast_requirement)
def read_file(filename):
with open(filename, encoding="utf-8") as f:
return f.read().strip()
After Change
version = read_file("VERSION")
readme_text = read_file("README.md")
packages = find_packages(".", exclude=["tests"])
setup(
name="gpflow",
version=version,
author="James Hensman, Alex Matthews",
author_email="james.hensman@gmail.com",
description="Gaussian process methods in TensorFlow",
long_description=readme_text,
long_description_content_type="text/markdown",
license="Apache License 2.0",
keywords="machine-learning gaussian-processes kernels tensorflow",
url="https://www.gpflow.org",
project_urls={
"Source on GitHub": "https://github.com/GPflow/GPflow",
"Documentation": "https://gpflow.readthedocs.io",
},
packages=packages,
include_package_data=True,
install_requires=requirements,
extras_require={"ImageToTensorBoard": ["matplotlib"]},
python_requires=">=3.6",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.6",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: GPflow/GPflow
Commit Name: 7560936f09755b3fafe03ae1c5ccebb3c93984b6
Time: 2020-05-12
Author: st--@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name:
Project Name: hyperopt/hyperopt-sklearn
Commit Name: e9a9f58f8856e2a9da0b7411213f20fe4e04e7f9
Time: 2018-10-18
Author: saubin@uwaterloo.ca
File Name: setup.py
Class Name:
Method Name:
Project Name: r9y9/wavenet_vocoder
Commit Name: ee5e88bc0446986f6bc74080835e0566856d0e79
Time: 2019-09-07
Author: zryuichi@gmail.com
File Name: setup.py
Class Name:
Method Name: