mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-01 12:20:21 +08:00
BLD: Use strict bounds install for travis
with explicit requirements files Need to build extension modules explicitly now that we're not installing zipline Adds support for upper bounds, since we thought newer bcolz didn't work. It just needed newer setuptools.
This commit is contained in:
+3
-1
@@ -20,8 +20,10 @@ install:
|
||||
- source activate testenv
|
||||
- conda install --yes -c https://conda.binstar.org/Quantopian numpy=$NUMPY_VERSION pandas=$PANDAS_VERSION scipy==$SCIPY_VERSION matplotlib Cython patsy statsmodels tornado pyparsing xlrd mock pytz requests six dateutil ta-lib logbook
|
||||
- pip install --upgrade pip coverage
|
||||
- pip install -e .[dev]
|
||||
- pip install -r etc/requirements.txt
|
||||
- pip install -r etc/requirements_dev.txt
|
||||
- pip install -r etc/requirements_blaze.txt
|
||||
- python setup.py build_ext --inplace
|
||||
before_script:
|
||||
- pip freeze | sort
|
||||
- "flake8 zipline tests"
|
||||
|
||||
@@ -118,7 +118,24 @@ def _filter_requirements(lines_iter):
|
||||
yield requirement
|
||||
|
||||
|
||||
def read_requirements(path, strict_bounds=False):
|
||||
REQ_UPPER_BOUNDS = {
|
||||
}
|
||||
|
||||
|
||||
def _with_bounds(req):
|
||||
try:
|
||||
req, lower = req.split('==')
|
||||
except ValueError:
|
||||
return req
|
||||
else:
|
||||
with_bounds = [req, '>=', lower]
|
||||
upper = REQ_UPPER_BOUNDS.get(req)
|
||||
if upper:
|
||||
with_bounds.extend([',', upper])
|
||||
return ''.join(with_bounds)
|
||||
|
||||
|
||||
def read_requirements(path, strict_bounds):
|
||||
"""
|
||||
Read a requirements.txt file, expressed as a path relative to Zipline root.
|
||||
|
||||
@@ -132,11 +149,12 @@ def read_requirements(path, strict_bounds=False):
|
||||
if strict_bounds:
|
||||
return list(reqs)
|
||||
else:
|
||||
return [req.replace('==', '>=') for req in reqs]
|
||||
return list(map(_with_bounds, reqs))
|
||||
|
||||
|
||||
def install_requires():
|
||||
return read_requirements('etc/requirements.txt')
|
||||
def install_requires(strict_bounds=False):
|
||||
return read_requirements('etc/requirements.txt',
|
||||
strict_bounds=strict_bounds)
|
||||
|
||||
|
||||
def extras_requires():
|
||||
@@ -155,7 +173,7 @@ def module_requirements(requirements_path, module_names):
|
||||
found = set()
|
||||
module_lines = []
|
||||
parser = re.compile("([^=<>]+)([<=>]{1,2})(.*)")
|
||||
for line in read_requirements(requirements_path):
|
||||
for line in read_requirements(requirements_path, strict_bounds=False):
|
||||
match = parser.match(line)
|
||||
if match is None:
|
||||
raise AssertionError("Could not parse requirement: '%s'" % line)
|
||||
|
||||
Reference in New Issue
Block a user