Skip to content

Commit

Permalink
fix for broken readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Simkovic committed Apr 6, 2017
1 parent 989fb5a commit 068a3dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
# command:
# pip install -r requirements.txt

setuptools
numpy >=1.8.2
biopython >=1.64
matplotlib >=1.3.1
scipy >=0.16.0
matplotlib >=1.3.1
scikit-learn >=0.17
biopython >=1.64

14 changes: 12 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

from distutils.command.build import build
from distutils.util import convert_path
from setuptools import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup

import os
import sys

ON_RTD = os.environ.get('READTHEDOCS') == 'True'

# ==============================================================
# Setup.py command extensions
# ==============================================================
Expand Down Expand Up @@ -35,8 +40,13 @@ def run(self):

def dependencies():
with open('requirements.txt', 'r') as f_in:
return [l for l in f_in.read().rsplit(os.linesep)
deps = [l for l in f_in.read().rsplit(os.linesep)
if l and not l.startswith("#")]
# Fix for scikit-learn dependency nightmare referenced in
# scikit-learn/scikit-learn#8411 and rtfd/readthedocs.org#2760
if ON_RTD:
deps = [d for d in deps if not d.startswith('scikit-learn')]
return deps


def readme():
Expand Down

0 comments on commit 068a3dc

Please sign in to comment.