build on mac AND linux, also gotta not use these python files

This commit is contained in:
George Hotz 2019-12-14 19:48:56 -08:00
parent 79dbfc1aec
commit 6e6779f993
2 changed files with 15 additions and 4 deletions

View File

@ -39,6 +39,10 @@ ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() # pyl
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},
@ -52,8 +56,9 @@ setup(name='CAN packer',
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,

View File

@ -39,6 +39,11 @@ ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip() # pyl
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(
@ -51,8 +56,9 @@ setup(name='CAN parser',
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,