Browse Source

More work on setup.py; fixed issues in setup.cfg

Adjusted setup.cfg so "python setup.py nosetests" now works correctly.
Also added a "test" alias so that "python setup.py test" works.
tags/nilmdb-0.2^2
Jim Paris 9 years ago
parent
commit
a8db747768
2 changed files with 40 additions and 13 deletions
  1. +17
    -10
      setup.cfg
  2. +23
    -3
      setup.py

+ 17
- 10
setup.cfg View File

@@ -1,16 +1,23 @@
[aliases]
test = nosetests

[nosetests]
# note: the value doesn't matter, that's why they're empty here
nocapture=
nologcapture= # comment to see cherrypy logs on failure
with-coverage=
cover-inclusive=
# Note: values must be set to 1, and have no comments on the same line,
# for "python setup.py nosetests" to work correctly.
nocapture=1
# Comment this out to see CherryPy logs on failure:
nologcapture=1
with-coverage=1
cover-inclusive=1
cover-package=nilmdb
cover-erase=
##cover-html= # this works, puts html output in cover/ dir
##cover-branches= # need nose 1.1.3 for this
cover-erase=1
# this works, puts html output in cover/ dir:
# cover-html=1
# need nose 1.1.3 for this:
# cover-branches=1
#debug=nose
#debug-log=nose.log
stop=
stop=1
verbosity=2
tests=tests
#tests=tests/test_bulkdata.py
@@ -28,6 +35,6 @@ tests=tests
#tests=tests/test_iteratorizer.py
#tests=tests/test_client.py:TestClient.test_client_nilmdb
#tests=tests/test_nilmdb.py
#with-profile=
#with-profile=1
#profile-sort=time
##profile-restrict=10 # doesn't work right, treated as string or something

+ 23
- 3
setup.py View File

@@ -11,15 +11,35 @@

from setuptools import setup, find_packages
from distutils.extension import Extension

from Cython.Build import cythonize

# Build cython modules
# Hack to workaround logging/multiprocessing issue:
# https://groups.google.com/d/msg/nose-users/fnJ-kAUbYHQ/_UsLN786ygcJ
try: import multiprocessing
except: pass

# Build cython modules.
cython_modules = cythonize("**/*.pyx")

# Run setup
setup(name='nilmdb',
version='1.0',
install_requires = [ 'distribute' ],
packages = find_packages(),
tests_require = [ 'nose',
'coverage',
],
setup_requires = [ 'cython',
],
install_requires = [ 'distribute',
'decorator',
'datetime_tz',
],
packages = [ 'nilmdb',
'nilmdb.utils',
'nilmdb.server',
'nilmdb.client',
'nilmdb.cmdline',
],
ext_modules = cython_modules,
zip_safe = False,
)

Loading…
Cancel
Save