-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·85 lines (70 loc) · 2.88 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
#!/usr/bin/env python
# Copyright (C) 2020 Alex Sonea
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import re
import sys
from setuptools import setup, find_packages
def version():
with open('roboglia/_version.py') as f:
return re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read()).group(1)
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
"""
The following are not included in the dependencies because otherwise it would
make it impossible to use the framework on platforms where these
libraries are not available. Instead you should install the dependencies
manually as needed.
- if you want to use Dynamixel servos you need to install dynamixel_sdk
- if you want to use I2C devices you need to install SMBus
- if you want to use SPI devices you need to install spidev
"""
install_requires = ['pyyaml']
extras = {
"spi": ['spidev'],
"i2c": ['smbus2'],
"dynamixel": ['dynamixel-sdk'],
"all": ['spidev','smbus2','dynamixel-sdk']
}
if sys.version_info < (3, 0):
print("Waning: Python version 2 is not supported...")
setup(name='roboglia',
version=version(),
packages=find_packages(),
install_requires=install_requires,
extras_require=extras,
entry_points={},
package_data={'roboglia': ['base/devices/*.yml',
'dynamixel/devices/*.yml',
'i2c/devices/*.yml',
'spi/devices/*.yml']},
include_package_data=True,
exclude_package_data={'': ['.gitignore']},
zip_safe=False,
author='Alex Sonea',
author_email='alex.sonea@gmail.com',
description='Robotics Framework using Dynamixel SDK, I2C, SPI',
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
url='https://github.com/sonelu/roboglia',
project_urls = {
'Documentation': 'https://roboglia.readthedocs.io/en/latest/',
'Bug tracker': 'https://github.com/sonelu/roboglia/issues',
'Installation':
'https://roboglia.readthedocs.io/en/latest/install.html'
},
license='GNU GENERAL PUBLIC LICENSE Version 3',
classifiers=[
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering", ],
**extra
)