From cb7187e3ca6544d2e8babe708686dfa49045b57a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 24 Sep 2014 16:34:50 -0500 Subject: [PATCH] Update build requirements and documentation --- DEPENDS.txt | 11 +++++------ requirements.txt | 7 +++---- setup.py | 42 +++++++++++++++++++++++++----------------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/DEPENDS.txt b/DEPENDS.txt index eb7cc09c..1b301ca2 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -1,11 +1,8 @@ Build Requirements ------------------ -* `Python >= 2.5 `__ +* `Python >= 2.6 `__ * `Numpy >= 1.6 `__ -* `Cython >= 0.17 `__ - -`Matplotlib >= 1.0 `__ is needed to generate the -examples in the documentation. +* `Cython >= 0.19 `__ You can use pip to automatically install the base dependencies as follows:: @@ -13,8 +10,10 @@ You can use pip to automatically install the base dependencies as follows:: Runtime requirements -------------------- -* `SciPy >= 0.10 `__ +* `SciPy >= 0.9 `__ * `NetworkX >= 1.8 `__ +`Matplotlib >= 1.0 `__ is needed to generate the +examples in the documentation. Known build errors ------------------ diff --git a/requirements.txt b/requirements.txt index 7543d867..1af07ec6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -cython>=0.17 -matplotlib>=1.0 +cython>=0.19 numpy>=1.6 -six>=1.3.0 -networkx>=1.8.0 +scipy>=0.9 +six>=1.3 diff --git a/setup.py b/setup.py index 640329fc..c51ef097 100755 --- a/setup.py +++ b/setup.py @@ -18,25 +18,33 @@ URL = 'http://scikit-image.org' LICENSE = 'Modified BSD' DOWNLOAD_URL = 'http://github.com/scikit-image/scikit-image' VERSION = '0.11dev' -PYTHON_VERSION = (2, 5) +PYTHON_VERSION = (2, 6) + +import re +import os +import sys + +import setuptools +from distutils.command.build_py import build_py + # These are manually checked. # These packages are sometimes installed outside of the setuptools scope -DEPENDENCIES = { - 'numpy': (1, 6), - } - -# Only require Cython if we have a developer checkout -if VERSION.endswith('dev'): - DEPENDENCIES['Cython'] = (0, 17) - - - -import os -import sys -import re -import setuptools -from distutils.command.build_py import build_py +DEPENDENCIES = {} +with open('requirements.txt') as fid: + data = fid.read().decode('utf-8', 'replace') +for line in data.splitlines(): + pkg, _, version_info = line.partition('>=') + # Only require Cython if we have a developer checkout + if pkg.lower() == 'cython' and not VERSION.endswith('dev'): + continue + version = [] + for part in re.split('\D+', version_info): + try: + version.append(int(part)) + except ValueError: + pass + DEPENDENCIES[pkg.lower()] = version def configuration(parent_package='', top_path=None): @@ -142,7 +150,7 @@ if __name__ == "__main__": configuration=configuration, install_requires=[ - "six>=1.3" + "six>=%s" % DEPENDENCIES['six'] ], packages=setuptools.find_packages(exclude=['doc']), include_package_data=True,