-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·64 lines (56 loc) · 1.97 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
version = "1.2.1"
try:
import pypandoc
readme_txt = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
readme_txt = ""
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
if sys.argv[-1] == 'publish':
os.system('rm -fr dist/*')
os.system('python setup.py sdist')
os.system('twine upload dist/*')
sys.exit()
setup(
name='candy-board-amt',
version=version,
author='Daisuke Baba',
author_email='[email protected]',
url='http://github.com/CANDY-LINE/candy-board-amt',
download_url='https://github.com/CANDY-LINE/candy-board-amt/tarball/{0}'
.format(version),
description='Base CANDY LINE boards service for AM Telecom Modules',
long_description=readme_txt,
packages=find_packages('lib'),
package_dir={'': 'lib'},
license='BSD3',
classifiers=[
'Programming Language :: Python',
'Development Status :: 5 - Production/Stable',
'Natural Language :: English',
'Environment :: Console',
'Intended Audience :: System Administrators',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Topic :: System :: Hardware',
],
keywords=('CANDY EGG', 'CANDY LINE'),
tests_require=['pytest-cov>=2.2.0',
'pytest>=2.6.4',
'terminaltables>=1.2.1'],
cmdclass={'test': PyTest}
)