<#17718 Incorporating Cythonized shared library fi...
# github-notifications
q
#17718 Incorporating Cythonized shared library files in the build workflow New discussion created by erickpeirson Moving this over from Slack * * * Hey folks, I have a use case in Python that I suspect isn't terribly special, and I wonder if folks could point me in the right direction. I have a codebase with a large library, and a handful of applications that use the library. The final distribution target is a container image, and I'm hoping to build the application itself as a Pex. When we ship the final build, the modules in the library are cythonized to shared library files. We do this today via setuptools
build_ext
, and implement our own cache so that we only rebuild modules that have changed. I can define a distribution target for the library in Pants that triggers the
build_ext
routine, but in this case our cache doesn't work. And when building the Pex, I'd like to bring along just those shared library files that are required and not the whole boatload. It seems like what I want is to be able to define a target for each eventual shared library file, with dependencies looking something like:
Copy code
pex -> application code -> .so file -> .py source
Before I dive too deep into the plugin framework, any pointers or feedback? If I were to go the route of writing a plugin, any words of advice for how to think about this? pantsbuild/pants