setup.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
try
:
4
from
setuptools
import
setup
5
except
ImportError:
6
from
distutils.core
import
setup
7
8
try
:
9
from
catkin_pkg.python_setup
import
generate_distutils_setup
10
d = generate_distutils_setup()
11
except
ImportError:
12
# extract information from package.xml manually when catkin_pkg is unavailable
13
from
xml.etree
import
ElementTree
14
tree = ElementTree.parse(
'package.xml'
)
15
root = tree.getroot()
16
d = {
17
'name'
: root.find(
'./name'
).text,
18
'version'
: root.find(
'./version'
).text,
19
'maintainer'
: root.findall(
'./maintainer'
)[0].text,
20
'maintainer_email'
: root.findall(
'./maintainer'
)[0].attrib[
'email'
],
21
'license'
:
', '
.join([x.text
for
x
in
root.findall(
'./license'
)]),
22
'url'
: root.findall(
'./url'
)[0].text,
23
'author'
:
', '
.join([x.text
for
x
in
root.findall(
'./author'
)]),
24
}
25
description = root.find(
'./description'
).text.strip()
26
if
len(description) <= 200:
27
d[
'description'
] = description
28
else
:
29
d[
'description'
] = description[:197] +
'...'
30
d[
'long_description'
] = description
31
32
d.update({
33
'packages'
: [d[
'name'
]],
34
'package_dir'
: {
''
:
'src'
},
35
'classifiers'
: [
36
'Development Status :: 5 - Production/Stable'
,
37
'Intended Audience :: Developers'
,
38
'Operating System :: OS Independent'
,
39
'Programming Language :: Python'
,
40
'Topic :: Software Development :: Libraries :: Python Modules'
,
41
'License :: OSI Approved :: BSD License'
,
42
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)'
,
43
'License :: OSI Approved :: GNU General Public License (GPL)'
,
44
],
45
})
46
47
setup
(**d)
setup
python_qt_binding
Author(s): Dave Hershberger, Dorian Scholz, Dirk Thomas
autogenerated on Wed Mar 2 2022 00:46:45