Our repo is going to have both C++ and Python livi...
# general
g
Our repo is going to have both C++ and Python living together. We'll use pybind11 to wrap some of the c++ code to python. I understand Pants doesn't support C++. Do you have any advice/recommendation on how to structure our project and use Pants to achieve this goal?
Guess I might have to use both cmake&pants, or bazel&pants for this.. But just want to learn first from your expert opinions.
e
@wide-midnight-78598 has been working on c / c++ support recently, he may have some updates on the status of that for you. I think there is a good bit left to do, but I'm sure he'd welcome input on your current c++ setup and the tools you use.
w
https://github.com/pantsbuild/pants/pull/16424 Targeting first-party support - has a couple bugs, but somewhat compiles/links code. Working on adding basic Catch (and or Gtest) support before the PR is ready for review. Was intending for that to be done this week, but I've been sidelined this week unfortunately
👀 1
I'd be curious if/how you use 3rd party libs, as that would be the next upcomign piece
h
Is there a lot of C++ code? And is any of it used independently of Python? For small amounts of C++ that is intended to be used as a native Python extension, you can use regular setup.py, Pants supports that.
g
Is there a lot of C++ code? And is any of it used independently of Python?
yes, and yes. A small part of our C++ will be wrapped to Python, but currently the majority of our code is in C++..
I'd be curious if/how you use 3rd party libs, as that would be the next upcomign piece
I've only experienced the bazel-way to do it. Here's an example with many third-party libs. Essentially, we just download the source and rebuild them in bazel, or, for libraries installed in the system, define a target to compile with their headers and link with the libs, e.g. this.
👍 1