Skip to content

Commit 93885cb

Browse files
authored
Merge branch 'master' into doxygen
2 parents 91f26fe + d64b625 commit 93885cb

File tree

2 files changed

+56
-30
lines changed

2 files changed

+56
-30
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ script:
5050
- cd build
5151
- cmake ..
5252
- cmake --build .
53+
- cd ..
54+
- python setup.py build
55+
- python setup.py sdist

setup.py

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
#! python
22
# -*- coding: UTF-8 -*-
33

4-
from setuptools import setup
5-
from setuptools.command.install import install
6-
import subprocess
74
import os
5+
import subprocess
86
import sys
97
from distutils.spawn import find_executable
108

9+
from setuptools import setup
10+
from setuptools.command.install import install
11+
1112
package_name = 'osi'
1213
package_path = os.path.join(os.getcwd(), package_name)
1314

1415

1516
class GenerateProtobuf(install):
17+
1618
@staticmethod
1719
def find_protoc():
1820
"""Locates protoc executable"""
@@ -23,22 +25,40 @@ def find_protoc():
2325
protoc = find_executable('protoc')
2426

2527
if protoc is None:
26-
sys.stderr.write('protoc not found. Is protobuf-compiler installed? \n'
27-
'Alternatively, you can point the PROTOC environment variable at a local version.')
28+
sys.stderr.write(
29+
'protoc not found. Is protobuf-compiler installed? \n'
30+
'Alternatively, you can point the PROTOC environment variable'
31+
'at a local version.')
2832
sys.exit(1)
2933
return protoc
3034

31-
osi_files = ('osi_common.proto', 'osi_datarecording.proto', 'osi_detectedlandmark.proto',
32-
'osi_detectedobject.proto', 'osi_detectedoccupant.proto', 'osi_detectedlane.proto',
33-
'osi_environment.proto', 'osi_groundtruth.proto', 'osi_landmark.proto', 'osi_lowleveldata.proto',
34-
'osi_modelinternal.proto', 'osi_object.proto', 'osi_occupant.proto', 'osi_lane.proto',
35-
'osi_sensordata.proto', 'osi_sensorspecific.proto')
35+
osi_files = (
36+
'osi_common.proto',
37+
'osi_datarecording.proto',
38+
'osi_detectedlandmark.proto',
39+
'osi_detectedobject.proto',
40+
'osi_detectedoccupant.proto',
41+
'osi_detectedlane.proto',
42+
'osi_environment.proto',
43+
'osi_groundtruth.proto',
44+
'osi_landmark.proto',
45+
'osi_lowleveldata.proto',
46+
'osi_modelinternal.proto',
47+
'osi_object.proto',
48+
'osi_occupant.proto',
49+
'osi_lane.proto',
50+
'osi_sensordata.proto',
51+
'osi_sensorspecific.proto')
3652

3753
""" Generate Protobuf Messages """
54+
3855
def run(self):
3956
for source in self.osi_files:
4057
sys.stdout.write('Protobuf-compiling ' + source + '\n')
41-
subprocess.check_call([self.find_protoc(), '--proto_path=.', '--python_out='+package_path, './' + source])
58+
subprocess.check_call([self.find_protoc(),
59+
'--proto_path=.',
60+
'--python_out=' + package_path,
61+
'./' + source])
4262

4363
install.run(self)
4464

@@ -52,23 +72,26 @@ def run(self):
5272
except Exception:
5373
pass
5474

55-
setup(name='open-simulation-interface',
56-
version='2.0.0',
57-
description='A generic interface for the environmental perception of automated driving functions in virtual '
58-
'scenarios.',
59-
author='Carlo van Driesten, Timo Hanke, Nils Hirsenkorn, Pilar Garcia-Ramos, Mark Schiementz, '
60-
'Sebastian Schneider',
61-
author_email='Carlo.van-Driesten@bmw.de, Timo.Hanke@bmw.de, Nils.Hirsenkorn@tum.de, Pilar.Garcia-Ramos@bmw.de,'
62-
'Mark.Schiementz@bmw.de, Sebastian.SB.Schneider@bmw.de',
63-
packages=[package_name],
64-
install_requires=['protobuf'],
65-
cmdclass={
75+
setup(
76+
name='open-simulation-interface',
77+
version='2.0.0',
78+
description='A generic interface for the environmental perception of'
79+
'automated driving functions in virtual scenarios.',
80+
author='Carlo van Driesten, Timo Hanke, Nils Hirsenkorn,'
81+
'Pilar Garcia-Ramos, Mark Schiementz, Sebastian Schneider',
82+
author_email='Carlo.van-Driesten@bmw.de, Timo.Hanke@bmw.de,'
83+
'Nils.Hirsenkorn@tum.de, Pilar.Garcia-Ramos@bmw.de,'
84+
'Mark.Schiementz@bmw.de, Sebastian.SB.Schneider@bmw.de',
85+
packages=[package_name],
86+
install_requires=['protobuf'],
87+
cmdclass={
6688
'install': GenerateProtobuf,
67-
},
68-
url='https://github.com/OpenSimulationInterface/open-simulation-interface',
69-
license="MPL 2.0",
70-
classifiers=[
71-
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
72-
],
73-
data_files=[("", ["LICENSE"])]
74-
)
89+
},
90+
url='https://github.com/OpenSimulationInterface/open-simulation-interface',
91+
license="MPL 2.0",
92+
classifiers=[
93+
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
94+
],
95+
data_files=[
96+
("",
97+
["LICENSE"])])

0 commit comments

Comments
 (0)