|
1 | 1 | #!/usr/bin/env python |
2 | 2 | # -*- encoding: utf-8 -*- |
3 | | -from __future__ import absolute_import |
4 | | -from __future__ import print_function |
| 3 | +from __future__ import absolute_import, print_function |
5 | 4 |
|
6 | 5 | import io |
7 | 6 | import re |
8 | 7 | import sys |
9 | 8 | from glob import glob |
10 | | -from os.path import abspath |
11 | | -from os.path import basename |
12 | | -from os.path import dirname |
13 | | -from os.path import join |
14 | | -from os.path import splitext |
| 9 | +from os.path import abspath, basename, dirname, join, splitext |
15 | 10 |
|
16 | | -from setuptools import find_packages |
17 | | -from setuptools import setup |
| 11 | +from setuptools import find_packages, setup |
18 | 12 |
|
19 | 13 | here = abspath(dirname(__file__)) |
20 | 14 |
|
21 | 15 | # If IronPython, we don't require autobahn/twisted |
22 | 16 | if sys.platform == "cli": |
23 | 17 | requirements = [] |
24 | 18 | else: |
25 | | - requirements = [ |
26 | | - 'autobahn>=17.10', |
27 | | - 'twisted>=17.9' |
28 | | - ] |
| 19 | + requirements = ["autobahn>=17.10", "twisted>=17.9"] |
29 | 20 |
|
30 | 21 |
|
31 | 22 | def read(*names, **kwargs): |
32 | | - return io.open( |
33 | | - join(here, *names), |
34 | | - encoding=kwargs.get('encoding', 'utf8') |
35 | | - ).read() |
| 23 | + return io.open(join(here, *names), encoding=kwargs.get("encoding", "utf8")).read() |
36 | 24 |
|
37 | 25 |
|
38 | 26 | about = {} |
39 | | -exec(read('src', 'roslibpy', '__version__.py'), about) |
| 27 | +exec(read("src", "roslibpy", "__version__.py"), about) |
40 | 28 |
|
41 | 29 | setup( |
42 | | - name=about['__title__'], |
43 | | - version=about['__version__'], |
44 | | - license=about['__license__'], |
45 | | - description=about['__description__'], |
46 | | - author=about['__author__'], |
47 | | - author_email=about['__author_email__'], |
48 | | - url=about['__url__'], |
49 | | - long_description='%s\n%s' % ( |
50 | | - re.compile('^.. start-badges.*^.. end-badges', re.M | |
51 | | - re.S).sub('', read('README.rst')), |
52 | | - re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst')) |
| 30 | + name=about["__title__"], |
| 31 | + version=about["__version__"], |
| 32 | + license=about["__license__"], |
| 33 | + description=about["__description__"], |
| 34 | + author=about["__author__"], |
| 35 | + author_email=about["__author_email__"], |
| 36 | + url=about["__url__"], |
| 37 | + long_description="%s\n%s" |
| 38 | + % ( |
| 39 | + re.compile("^.. start-badges.*^.. end-badges", re.M | re.S).sub("", read("README.rst")), |
| 40 | + re.sub(":[a-z]+:`~?(.*?)`", r"``\1``", read("CHANGELOG.rst")), |
53 | 41 | ), |
54 | | - packages=find_packages('src'), |
55 | | - package_dir={'': 'src'}, |
56 | | - py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')], |
| 42 | + packages=find_packages("src"), |
| 43 | + package_dir={"": "src"}, |
| 44 | + py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")], |
57 | 45 | include_package_data=True, |
58 | 46 | zip_safe=False, |
59 | 47 | classifiers=[ |
60 | | - 'Development Status :: 4 - Beta', |
61 | | - 'Intended Audience :: Developers', |
62 | | - 'Intended Audience :: Science/Research', |
63 | | - 'License :: OSI Approved :: MIT License', |
64 | | - 'Operating System :: Unix', |
65 | | - 'Operating System :: POSIX', |
66 | | - 'Operating System :: Microsoft :: Windows', |
67 | | - 'Programming Language :: Python', |
68 | | - 'Programming Language :: Python :: 3', |
69 | | - 'Programming Language :: Python :: 3.3', |
70 | | - 'Programming Language :: Python :: 3.4', |
71 | | - 'Programming Language :: Python :: 3.5', |
72 | | - 'Programming Language :: Python :: 3.6', |
73 | | - 'Programming Language :: Python :: 3.7', |
74 | | - 'Programming Language :: Python :: 3.8', |
75 | | - 'Programming Language :: Python :: Implementation :: CPython', |
76 | | - 'Programming Language :: Python :: Implementation :: IronPython', |
77 | | - 'Topic :: Scientific/Engineering', |
| 48 | + "Development Status :: 4 - Beta", |
| 49 | + "Intended Audience :: Developers", |
| 50 | + "Intended Audience :: Science/Research", |
| 51 | + "License :: OSI Approved :: MIT License", |
| 52 | + "Operating System :: Unix", |
| 53 | + "Operating System :: POSIX", |
| 54 | + "Operating System :: Microsoft :: Windows", |
| 55 | + "Programming Language :: Python", |
| 56 | + "Programming Language :: Python :: 3", |
| 57 | + "Programming Language :: Python :: 3.3", |
| 58 | + "Programming Language :: Python :: 3.4", |
| 59 | + "Programming Language :: Python :: 3.5", |
| 60 | + "Programming Language :: Python :: 3.6", |
| 61 | + "Programming Language :: Python :: 3.7", |
| 62 | + "Programming Language :: Python :: 3.8", |
| 63 | + "Programming Language :: Python :: Implementation :: CPython", |
| 64 | + "Programming Language :: Python :: Implementation :: IronPython", |
| 65 | + "Topic :: Scientific/Engineering", |
78 | 66 | ], |
79 | | - keywords=['ros', 'ros-bridge', 'robotics', 'websockets'], |
| 67 | + keywords=["ros", "ros-bridge", "robotics", "websockets"], |
80 | 68 | install_requires=requirements, |
81 | 69 | extras_require={}, |
82 | | - entry_points={ |
83 | | - 'console_scripts': [ |
84 | | - 'roslibpy=roslibpy.__main__:main' |
85 | | - ] |
86 | | - }, |
| 70 | + entry_points={"console_scripts": ["roslibpy=roslibpy.__main__:main"]}, |
87 | 71 | ) |
0 commit comments