-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (31 loc) · 964 Bytes
/
setup.py
File metadata and controls
47 lines (31 loc) · 964 Bytes
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
39
40
41
42
43
44
45
46
47
from setuptools import Command, find_packages, setup
import versioneer
cmdclass = versioneer.get_cmdclass()
class test(Command):
"""Run the test suite."""
description = "Run the test suite"
user_options = [('verbosity', 'v', 'set test report verbosity')]
def initialize_options(self):
self.verbosity = 0
def finalize_options(self):
try:
self.verbosity = int(self.verbosity)
except ValueError:
raise ValueError('Verbosity must be an integer.')
def run(self):
import unittest
suite = unittest.TestLoader().discover('hexedd')
unittest.TextTestRunner(verbosity=self.verbosity+1).run(suite)
cmdclass['test'] = test
package_data = {
'hexedd': [
'spectra/data/*.dat'
]
}
setup(
name = 'hexedd',
packages = find_packages(),
version = versioneer.get_version(),
package_data = package_data,
cmdclass = cmdclass,
)