Skip to content

Commit

Permalink
RF: (py)nifti -> nibabel in various places; Makefile cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Dec 22, 2009
1 parent b95dd66 commit e58178e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 42 deletions.
2 changes: 1 addition & 1 deletion AUTHOR
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Michael Hanke <[email protected]>
Matthew Brett <[email protected]>
Michael Hanke <[email protected]>
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
License
*******

The PyNIfTI package, including all examples, code snippets and attached
The nibabel package, including all examples, code snippets and attached
documentation is covered by the MIT license.

::
Expand Down
49 changes: 11 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ DISTUTILS_PLATFORM := \

all: build

# build included 3rd party pieces (if present)
cn_3rd: cn_3rd-stamp
cn_3rd-stamp:
find 3rd -mindepth 1 -maxdepth 1 -type d | \
while read d; do \
[ -f "$$d/Makefile" ] && $(MAKE) -C "$$d"; \
done
touch $@


cn_build: cn_build-stamp
cn_build-stamp: cn_3rd
python setup_cnifti.py config --noisy
python setup_cnifti.py build_ext
python setup_cnifti.py build_py
# to overcome the issue of not-installed _clib.so
ln -sf ../build/lib.$(DISTUTILS_PLATFORM)-$(PYVER)/cnifti/_clib.so cnifti/
ln -sf ../build/src.$(DISTUTILS_PLATFORM)-$(PYVER)/cnifti/clib.py cnifti/
touch $@

build:
python setup.py config --noisy
python setup.py build
Expand All @@ -51,8 +31,6 @@ build:
clean:
-rm -rf build
-rm *-stamp
-rm cnifti/clib.py cnifti/_clib.so
find 3rd -mindepth 2 -maxdepth 2 -type f -name '*-stamp' | xargs -L10 rm -f

distclean: clean
-rm MANIFEST
Expand All @@ -67,7 +45,7 @@ distclean: clean
-o -iname '*.prof' \
-o -iname '#*#' | xargs -L10 rm -f
-rm -r dist
-rm build-stamp apidoc-stamp
-rm build-stamp
# -rm tests/data/*.hdr.* tests/data/*.img.* tests/data/something.nii \
# tests/data/noise* tests/data/None.nii

Expand All @@ -91,11 +69,10 @@ ut-%: build
@PYTHONPATH=.:$(PYTHONPATH) nosetests nifti/tests/test_$*.py


unittest: build cn_build
unittest: build
@PYTHONPATH=.:$(PYTHONPATH) nosetests nifti --with-doctest
nosetests cnifti --with-doctest

testmanual: build cn_build
testmanual: build
# go into data, because docs assume now data dir
@PYTHONPATH=.:$(PYTHONPATH) nosetests --with-doctest --doctest-extension=.txt doc

Expand Down Expand Up @@ -130,7 +107,7 @@ website-stamp: $(WWW_DIR) htmldoc pdfdoc

upload-website: website
rsync -rzhvp --delete --chmod=Dg+s,g+rw $(WWW_DIR)/* \
web.sourceforge.net:/home/groups/n/ni/niftilib/htdocs/pynifti/
web.sourceforge.net:/home/groups/n/ni/niftilib/htdocs/nibabel/

#
# Sources
Expand All @@ -149,9 +126,6 @@ pylint: distclean
orig-src: build
# clean existing dist dir first to have a single source tarball to process
-rm -rf dist
# update manpages
PYTHONPATH=. help2man -N -n "compute peristimulus timeseries of fMRI data" \
bin/pynifti_pst > man/pynifti_pst.1
# now clean
$(MAKE) distclean
# check versions
Expand All @@ -162,21 +136,20 @@ orig-src: build
# to keep it out of the Debian diff
file=$$(ls -1 dist); \
ver=$${file%*.tar.gz}; \
ver=$${ver#pynifti-*}; \
mv dist/$$file ../pynifti_$$ver.tar.gz
ver=$${ver#nibabel-*}; \
mv dist/$$file ../nibabel_$$ver.tar.gz


bdist_rpm: 3rd
bdist_rpm:
python setup.py bdist_rpm \
--doc-files "doc" \
--packager "Michael Hanke <[email protected]>" \
--vendor "Michael Hanke <[email protected]>"
--packager "nibabel authors <[email protected]>" \
--vendor "nibabel authors <[email protected]>"


# build MacOS installer -- depends on patched bdist_mpkg for Leopard
bdist_mpkg: 3rd
python tools/mpkg_wrapper.py setup.py build_ext
bdist_mpkg:
python tools/mpkg_wrapper.py setup.py install


.PHONY: orig-src pylint apidoc
.PHONY: orig-src pylint
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
# Version scheme is:
# 0.<4-digit-year><2-digit-month><2-digit-day>.<ever-increasing-integer>

setup(name = 'pynifti',
setup(name = 'nibabel',
version = '0.2009xxxx.1',
author = 'Michael Hanke and Matthew Brett',
author = 'Matthew Brett and Michael Hanke',
author_email = 'PyNIfTI List <[email protected]>',
license = 'MIT License',
url = 'http://niftilib.sf.net/pynifti',
Expand Down

0 comments on commit e58178e

Please sign in to comment.