Skip to content

Commit

Permalink
ENH : setup.py + packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
agramfort committed May 12, 2011
1 parent 73f428e commit b59e350
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
*~
.#*
*.swp
*.lprof
*.npy
*.zip
*.tar.*
*.egg*
*.tmproj
tmtags
auto_examples
MNE-sample-data
build

dist/
Expand Down
Empty file.
25 changes: 20 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
[aliases]
# python2.7 has upgraded unittest and it is no longer compatible with some
# of our tests, so we run all through nose
test = nosetests
release = egg_info -RDb ''
# Make sure the sphinx docs are built each time we do a dist.
bdist = build_sphinx bdist
sdist = build_sphinx sdist
# Make sure a zip file is created each time we build the sphinx docs
build_sphinx = generate_help build_sphinx zip_help
# Make sure the docs are uploaded when we do an upload
upload = upload upload_help

[egg_info]
tag_build = .dev

[bdist_rpm]
doc-files = doc

[nosetests]
verbosity = 2
detailed-errors = 1
with-doctest = 1
with-coverage = 1
cover-package = mne

#pdb = 1
#pdb-failures = 1
with-doctest = 1
doctest-extension=rst
44 changes: 39 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,46 @@
descr = """MNE python project for MEG and EEG data analysis."""

import os
import sys

import mne

DISTNAME = 'mne'
DESCRIPTION = 'MNE python project for MEG and EEG data analysis'
LONG_DESCRIPTION = descr
MAINTAINER = 'Alexandre Gramfort'
MAINTAINER_EMAIL = '[email protected]'
URL = 'http://github.com/mne/mne'
URL = 'http://github.com/mne-tools/mne-python'
LICENSE = 'BSD (3-clause)'
DOWNLOAD_URL = 'http://github.com/mne/mne'
VERSION = '0.1.git'
DOWNLOAD_URL = 'http://github.com/mne-tools/mne-python'
VERSION = mne.__version__

import setuptools # we are using a setuptools namespace
from numpy.distutils.core import setup

# For some commands, use setuptools
if len(set(('develop', 'sdist', 'release', 'bdist_egg', 'bdist_rpm',
'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info',
'build_sphinx', 'egg_info', 'easy_install', 'upload',
)).intersection(sys.argv)) > 0:
from setupegg import extra_setuptools_args

# extra_setuptools_args is injected by the setupegg.py script, for
# running the setup with setuptools.
if not 'extra_setuptools_args' in globals():
extra_setuptools_args = dict()


# if nose available, provide test command
try:
from nose.commands import nosetests
cmdclass = extra_setuptools_args.pop('cmdclass', {})
cmdclass['test'] = nosetests
cmdclass['nosetests'] = nosetests
extra_setuptools_args['cmdclass'] = cmdclass
except ImportError:
pass


if __name__ == "__main__":
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
Expand All @@ -46,5 +71,14 @@
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS'
]
)
],
platforms='any',
packages=['mne', 'mne.tests',
'mne.fiff', 'mne.fiff.tests',
'mne.datasets', 'mne.datasets.sample',
'mne.stats', 'mne.stats.tests',
'mne.artifacts', 'mne.artifacts.tests',
'mne.minimum_norm', 'mne.minimum_norm.tests',
'mne.layouts',
'mne.time_frequency', 'mne.time_frequency.tests'],
**extra_setuptools_args)

0 comments on commit b59e350

Please sign in to comment.