Skip to content

Commit

Permalink
ENH : adding make trailing-spaces target
Browse files Browse the repository at this point in the history
ENH : adding make clean target to clean development version
ENH : adding support for make inplace to setup devel version
ENH : adding make test target
  • Loading branch information
agramfort committed Sep 9, 2011
1 parent 6d58a06 commit f07bf92
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Files are then pushed to sourceforge using rsync with a command like this:
# rsync -e ssh nipype-0.1-py2.5.egg cburns,[email protected]:/home/frs/project/n/ni/nipy/nipype/nipype-0.1/

PYTHON ?= python
NOSETESTS ?= nosetests

zipdoc:
@echo "Clean documentation directory."
python setup.py clean
Expand All @@ -14,16 +17,50 @@ sdist: zipdoc
@echo "Building source distribution..."
python setup.py sdist
@echo "Done building source distribution."
# XXX copy documentation.zip to dist directory.
# XXX copy documentation.zip to dist directory.
# XXX Somewhere the doc/_build directory is removed and causes
# this script to fail.
# this script to fail.

egg: zipdoc
@echo "Building egg..."
python setup.py bdist_egg
@echo "Done building egg."

upload_to_pypi: zipdoc
@echo "Uploading to PyPi..."
python setup.py sdist --formats=zip,gztar upload

trailing-spaces:
find . -name "*.py" | xargs perl -pi -e 's/[ \t]*$$//'

clean-pyc:
find . -name "*.pyc" | xargs rm -f

clean-so:
find . -name "*.so" | xargs rm -f
find . -name "*.pyd" | xargs rm -f

clean-build:
rm -rf build

clean-ctags:
rm -f tags

clean: clean-build clean-pyc clean-so clean-ctags

in: inplace # just a shortcut
inplace:
$(PYTHON) setup.py build_ext -i

test-code: in
$(NOSETESTS) -s nipype
test-doc:
$(NOSETESTS) -s --with-doctest --doctest-tests --doctest-extension=rst \
--doctest-fixtures=_fixture doc/

test-coverage:
$(NOSETESTS) -s --with-coverage --cover-html --cover-html-dir=coverage \
--cover-package=nipype nipype

test: test-code test-doc

0 comments on commit f07bf92

Please sign in to comment.