Skip to content

Commit

Permalink
build on mac AND linux, also gotta not use these python files
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Dec 15, 2019
1 parent 79dbfc1 commit 6e6779f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 7 additions & 2 deletions can/packer_pyx_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def get_ext_filename(self, ext_name):
if ARCH == "aarch64":
extra_compile_args += ["-Wno-deprecated-register"]

if platform.system() == "Darwin":
libdbc = "libdbc.dylib"
else:
libdbc = "libdbc.so"

setup(name='CAN packer',
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
Expand All @@ -52,8 +56,9 @@ def get_ext_filename(self, ext_name):
BASEDIR,
os.path.join(BASEDIR, 'phonelibs', 'capnp-cpp/include'),
],
libraries=["dbc"],
library_dirs=["."],
extra_link_args=[
os.path.join(BASEDIR, 'opendbc', 'can', libdbc),
],
)
),
nthreads=4,
Expand Down
10 changes: 8 additions & 2 deletions can/parser_pyx_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def get_ext_filename(self, ext_name):
if ARCH == "aarch64":
extra_compile_args += ["-Wno-deprecated-register"]

if platform.system() == "Darwin":
libdbc = "libdbc.dylib"
else:
libdbc = "libdbc.so"

setup(name='CAN parser',
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
ext_modules=cythonize(
Expand All @@ -51,8 +56,9 @@ def get_ext_filename(self, ext_name):
BASEDIR,
os.path.join(BASEDIR, 'phonelibs', 'capnp-cpp/include'),
],
libraries=["dbc"],
library_dirs=["."],
extra_link_args=[
os.path.join(BASEDIR, 'opendbc', 'can', libdbc),
],
)
),
nthreads=4,
Expand Down

0 comments on commit 6e6779f

Please sign in to comment.