-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
39 lines (33 loc) · 1.24 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
import sys
from distutils.core import setup
from setuptools.command.test import test as TestCommand
from setuptools import setup, find_packages
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ''
def run_tests(self):
import shlex
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
setup(name='nbayes',
use_scm_version = {
'write_to': 'nbayes/version.py',
'tag_regex': r'^(?P<prefix>v)(?P<version>\d+\.\d+\.\d+)(?P<suffix>.*)?$',
# NOTE: use ./setup.py --version to regenerate version.py and print the
# computed version
},
version = '1.0',
description = 'My boring Bayesian computer',
author = 'Paul Miller',
author_email = '[email protected]',
url = 'https://github.com/jettero/trivial-bayes',
packages = find_packages(),
cmdclass = { 'test': PyTest },
setup_requires = [ 'setuptools_scm' ],
install_requires = [ 'tabulate' ],
tests_require = [ 'pytest', 'tabulate' ],
)