-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
46 lines (40 loc) · 1.46 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
from setuptools import find_packages
from pkg_resources import parse_version
dependency_links = [
"https://github.com/sdatkinson/GPflow" # Use my fork
]
requirements = [
"matplotlib>=2.1.2",
"gpflow==1.1.1",
"pytest>=3.5.0"
]
# Check for TensorFlow
# From GPflow:
# Only detect TF if not installed or outdated. If not, do not do not list as
# requirement to avoid installing over e.g. tensorflow-gpu
# To avoid this, rely on importing rather than the package name (like pip).
min_tf_version = '1.5.0'
tf_cpu = 'tensorflow>={}'.format(min_tf_version)
tf_gpu = 'tensorflow-gpu>={}'.format(min_tf_version)
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) as e:
# Add TensorFlow to dependencies to trigger installation/update
requirements.append(tf_cpu)
setup(name='structured_gpflow',
version='0.1.0',
description='structured-gpflow - GPs with Kronecker tricks',
author='Steven Atkinson',
author_email='steven@atkinson.mn',
url='https://github.com/cics-nd/structured-gpflow',
install_requires=requirements,
dependency_links=dependency_links,
packages=find_packages(),
)