from setuptools import find_packages, setup

from dichalcogenides import __version__

with open('README.rst', 'r') as f:
    long_description = f.read()

setup(
    name='dichalcogenides',
    version=__version__,
    author='Evan Sosenko',
    author_email='razorx@evansosenko.com',
    packages=find_packages(exclude=['docs']),
    url='https://github.com/razor-x/dichalcogenides',
    license='MIT',
    description='Python analysis code for dichalcogenide systems.',
    long_description=long_description,
    install_requires=[
        'numpy>=1.11.0,<2.0.0',
        'scipy>=0.17.0,<1.0.0',
        'pyyaml>=3.11,<4.0'
    ]
)

@@ -1,12 +1,32 @@
+import os%0Aimport re%0A
 from setupto
@@ -167,16 +167,196 @@
 read()%0A%0A
+if os.environ.get('READTHEDOCS') == 'True':%0A    mocked = %5B'numpy', 'scipy'%5D%0A    mock_filter = lambda x: re.sub(r'%3E.+', '', x) not in mocked%0Aelse:%0A    mock_filter = lambda p: True%0A%0A
 setup(%0A 
@@ -724,16 +724,41 @@
 equires=
+list(filter(mock_filter, 
 %5B%0A      
@@ -847,12 +847,14 @@
 .0'%0A
-
     %5D
+))
 %0A)%0A

Remove mocked dependencies for readthedocs