Skip to content

Commit

Permalink
Add parsing for torch nightlies/dev back in
Browse files Browse the repository at this point in the history
Note that this does currenlty not work properly on pip 19.0.1 due to a bug: pypa/pip#6163
  • Loading branch information
Balandat committed Apr 25, 2019
1 parent 32911e3 commit 1091df8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ def find_version(*file_paths):
version = find_version("gpytorch", "__init__.py")


torch_min = "1.0.1"
install_requires = [">=".join(["torch", torch_min])]
# if recent dev version of PyTorch is installed, no need to install stable
try:
import torch
if torch.__version__ >= torch_min:
install_requires = []
except ImportError:
pass


# Run the setup
setup(
name="gpytorch",
Expand All @@ -45,7 +56,7 @@ def find_version(*file_paths):
classifiers=["Development Status :: 4 - Beta", "Programming Language :: Python :: 3"],
packages=find_packages(),
python_requires=">=3.6",
install_requires=["torch>=1.0.1"],
install_requires=install_requires,
extras_require={
"dev": [
"black",
Expand Down

0 comments on commit 1091df8

Please sign in to comment.