forked from pingo-io/pingo-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
94 lines (79 loc) · 2.77 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# MIT Licensed. See LICENSE for more information.
""" Pingo setup module """
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import io
import os
import sys
pkgname = 'pingo'
version = '0.2.0'
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['pingo', '-vrsx']
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)
install_requires = [
'',
]
tests_require = [
'pytest',
]
metadata = {
"name": pkgname,
"version": version,
"author": "Pingo Team @ Garoa Hacker Clube",
"author_email": "luciano at sign ramalho within the dot org tld",
"url": "http://github.com/pingo-io/pingo-py",
"description": "Generic API to control boards with programmable IO pins.",
"license": "MIT",
"include_package_data": True,
"install_requires": install_requires,
"tests_require": tests_require,
"cmdclass": {'test': PyTest},
}
readme_path = os.path.join(os.path.dirname(__file__), 'README.rst')
try:
with io.open(readme_path, encoding='utf-8') as readme:
metadata["long_description"] = readme.read()
except IOError: # FIXME: how to reliably read the README.rst file in root installs?
metadata["long_description"] = 'See README.rst'
metadata["classifiers"] = [
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
"Environment :: Handhelds/PDA's",
'Environment :: Other Environment',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Information Technology',
'Intended Audience :: Manufacturing',
'Intended Audience :: Other Audience',
'Intended Audience :: Science/Research',
'Intended Audience :: Telecommunications Industry',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Education',
'Topic :: Home Automation',
'Topic :: Internet',
'Topic :: Other/Nonlisted Topic',
'Topic :: Software Development',
'Topic :: Software Development :: Embedded Systems',
'Topic :: Software Development :: Libraries :: Python Modules',
]
metadata["packages"] = find_packages(where='.')
setup(**metadata)
# Upload to PyPI:
# python setup.py sdist upload -r PyPI