diff --git a/.travis.yml b/.travis.yml index d03e480b4..3f5b01679 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,11 @@ python: - "3.5.3" - "3.6.1" install: - - pip install --process-dependency-links -e .[test] + - echo "pytest>3" >> requirements.txt + - echo "pytest-asyncio" >> requirements.txt + - echo "git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]" >> requirements.txt + - pip install -r requirements.txt + - pip install -e . script: - python -m compileall ./redbot/cogs - python -m pytest diff --git a/setup.py b/setup.py index 3af5fad69..a9ade9ddd 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,16 @@ from distutils.core import setup from pathlib import Path from subprocess import run, PIPE +import os + from setuptools import find_packages +IS_TRAVIS = 'TRAVIS' in os.environ + +dep_links = ['https://github.com/Rapptz/discord.py/tarball/rewrite#egg=discord.py-1.0'] +if IS_TRAVIS: + dep_links = [] + def get_package_list(): core = find_packages(include=['redbot', 'redbot.*']) @@ -13,7 +21,10 @@ def get_package_list(): def get_requirements(): with open('requirements.txt') as f: requirements = f.read().splitlines() - requirements.append('discord.py>=1.0.0a0') # Because RTD + if IS_TRAVIS: + requirements.remove('git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]') + else: + requirements.append('discord.py>=1.0.0a0') # Because RTD return requirements @@ -72,6 +83,7 @@ def find_locale_folders(): return ret + setup( name='Red-DiscordBot', version="{}.{}.{}b2".format(*get_version()), @@ -101,11 +113,11 @@ setup( python_requires='>=3.5', setup_requires=get_requirements(), install_requires=get_requirements(), - dependency_links=[ - 'https://github.com/Rapptz/discord.py/tarball/rewrite#egg=discord.py-1.0' - ], + dependency_links=dep_links, extras_require={ - 'test': ['pytest>=3', 'pytest-asyncio'], + 'test': [ + 'pytest>=3', 'pytest-asyncio' + ], 'mongo': ['motor'], 'docs': ['sphinx', 'sphinxcontrib-asyncio', 'sphinx_rtd_theme'], 'voice': ['PyNaCl']