From 33a09ebef856ed4f88911d3d949274bebf390cdc Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Fri, 28 Mar 2014 20:51:24 -0400 Subject: [PATCH] demote nose & sphinx to extra dependencies. Auto-install Python developer tools as needed --- ChangeLog | 5 +++++ Makefile | 23 +++++++++++++++++------ setup.py | 4 ++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87c674fd30..10e0875aff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ * .ycm_extra_conf.py: Update our custom YouCompleteMe configuration to query the package configuration for the proper compilation flags. +2014-03-28 Michael R. Crusoe + + * Makefile,setup.py: demote nose & sphinx to extra dependencies. + Auto-install Python developer tools as needed. + 2013-03-27 Michael R. Crusoe * The system zlib and bzip2 libraries are now used instead of the bundled diff --git a/Makefile b/Makefile index b70b659671..9b06efb04e 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ debug: --inplace doc: FORCE + pip install --user sphinx || pip install sphinx ./setup.py build_sphinx --fresh-env @echo '' @echo '--> docs in build/sphinx/html <--' @@ -39,31 +40,40 @@ cppcheck: FORCE --platform=unix64 --std=posix --quiet pep8: FORCE - pep8 --exclude=_version.py setup.py khmer/ scripts/ tests/ + pip install --user --quiet pep8==1.5 || pip install --quiet pep8==1.5 + pep8 --exclude=_version.py setup.py khmer/ scripts/ tests/ || true autopep8: FORCE + pip install --user autopep8 || pip install autopep8 autopep8 --recursive --in-place --exclude _version.py --ignore E309 setup.py \ khmer/ scripts/ tests/ pylint: all FORCE + pip install --user pylint || pip install pylint pylint -f parseable khmer/[!_]*.py khmer/__init__.py scripts/*.py tests \ || true -coverage.xml: FORCE +# We need to get coverage to look at our scripts. Since they aren't in a +# python module we can't tell nosetests to look for them (via an import +# statement). So we run nose inside of coverage. +.coverage: FORCE + pip install --user coverage || pip install coverage coverage run --branch --source=scripts,khmer -m nose --with-xunit \ --attr=\!known_failing --processes=0 + +coverage.xml: .coverage coverage xml -coverage.html: FORCE - coverage run --branch --source=scripts,khmer -m nose --with-xunit \ - --attr=\!known_failing --processes=0 - coverage html +coverage.html: .coverage + coverage html coverage-gcovr.xml: FORCE + pip install --user gcovr || pip install gcovr gcovr --root=. --branches --gcov-exclude='.*zlib.*|.*bzip2.*' --xml \ --output=coverage-gcovr.xml nosetests.xml: all + pip install --user nose || pip install nose ./setup.py nosetests --with-xunit doxygen: FORCE @@ -76,6 +86,7 @@ lib: $(MAKE) test: all + pip install --user nose || pip install nose ./setup.py nosetests FORCE: diff --git a/setup.py b/setup.py index 310da10249..8e4c9218fa 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ """ Setup for khmer project. """ import ez_setup -ez_setup.use_setuptools(version="0.6c11") +ez_setup.use_setuptools(version="0.7.2") import os from os import listdir as os_listdir @@ -98,7 +98,7 @@ "url": 'http://ged.msu.edu/', "packages": ['khmer'], "install_requires": ["screed >= 0.7.1", 'argparse >= 1.2.1', ], - "setup_requires": ['nose >= 1.0', 'sphinx', ], + "extras_require": {'docs': ['sphinx'], 'tests': ['nose >= 1.0']}, "scripts": SCRIPTS, "ext_modules": [EXTENSION_MOD, ], # "platforms": '', # empty as is conveyed by the classifiers below